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 Build a Simple iPhone App with Swift Views and View Controllers View Controllers and IBAction

jonathan hegranes
jonathan hegranes
2,868 Points

Why is my formatting off? (Centered items on storyboard are misaligned on the simulator)

I turned off "use size classes", but still have "use auto layout" checked... Not sure why my label and button aren't centered on the simulator.

alt text

3 Answers

Stone Preston
Stone Preston
42,016 Points

check the iPhone 5 simulator. it will be centered there. if you want it to be centered on all devices you will need to use auto layout constraints

jonathan hegranes
jonathan hegranes
2,868 Points

Thanks. All good now... Would have thought formatting for the 6 would have been the default.

Kieran Robinson
Kieran Robinson
9,411 Points

Just a quick one, have you added the constraints that auto layout needs to work? Kieran