Episode #35

Autolayout Fun

13 minutes
Published on September 27, 2012

This video is only available to subscribers. Get access to this video and 573 others.

In this episode I dive into the complex world of auto layout. Autolayout is an important and powerful new layout system in iOS 6, but it definitely takes some practice to understand fully. Even after practicing this episode a few times I ran into a couple of snags, however I hope this intro to Autolayout provides useful.

Episode Links

WWDC Videos on Autolayout

These videos are immensely helpful. If you have a developer account, then I highly recommend you watch all three videos.

Tips for Autolayout

  • Be careful about resizing views manually. Sometimes it can add additional constraint that you did not intend.
  • Watch the debugger window to auto layout errors. You certainly want to resolve these before shipping, otherwise you may have unintended layouts
  • Use ⌘= to size a view to its intrinsic size. Use this for UIButtons, UILabels, and UIImageViews to automatically size to their contents.