Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

jonathan hegranes
jonathan hegranes
2,868 Points

Storyboard / Simulator formatting errors in Xcode 6?

My storyboard has the username and password fields centered, but they are cutoff when I run the simulator.

Here's a shot from Xcode... alt text

Note, I'm running Xcode 6 (Beta 6)

1 Answer

Stone Preston
Stone Preston
42,016 Points

you will have to set some auto layout constraints in order to get them to be positioned correctly. You can try selection all your controls, then clicking the auto layout button that looks like a tie fighter ( |-O-| ) and selecting add missing constraints. sometimes xcode will get the constraints right, sometimes it wont. if it doesnt you will have to do it yourself.

alternatively you where you see the wAny hAny buttons you can change it so that it fits portrait, small form factor devices. (you have to use the grid control that pops up. its kind of confusing at first but you should be able to figure it out)

are you writing this in swift? if you arent using swift there really isnt a good reason to use xcode 6 honestly.