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 Improving Our User Interface Implementing Auto Layout

Project files has unaligned layout on iphone 6 Simulator

I took the project files of this Lesson and I tried it out on iphone 6 and it was unaligned. Is there is anything I am missing here?

1 Answer

Mathieu HAYS
Mathieu HAYS
9,623 Points

Using auto layout has become almost required in the latest update of Xcode with iOS 8 if you want your app to render properly.

The previous versions of Xcode enabled a better fallback when you were not using Auto Layout, but that's no longer the case because of the new screen sizes.

You should follow the guides provided by Apple about Auto Layout and Constraints to adapt your Storyboard to be adaptive.

https://developer.apple.com/library/IOs/documentation/UserExperience/Conceptual/AutolayoutPG/AutoLayoutbyExample/AutoLayoutbyExample.html#//apple_ref/doc/uid/TP40010853-CH5-SW1

By searching on Google about how auto layout works, I'm sure you'll find some great tutorials and videos to help you understand a bit more how to fix this.