// I need to

ModernizeUpgrade without breaking it RescueFix what someone else started Build NewTurn an idea into a product Reach More PeopleGet found, get used, include everyone

// Company

Case StudiesExpertiseAbout + CareersResourcesContact Book a call →
≡articleBuild New

Learning Auto Layout for iOS, tvOS, and OS X

With the iPhone SE, iPad Pro, and split screen, Auto Layout is here to stay. Top resources for learning Auto Layout and Size Classes for iOS, tvOS, and OS X.

Art+Logic May 23, 20162 min read

From the Art+Logic archive · written in 2016. The tools may have moved on; the thinking still holds.

autolayout graphic

iPadPro10-ApplePencil-SmartKeyboard-Splitview_PR-PRINTWith the release of the iPhone SE and the iPad Pro, along with the expectation that iPad apps will include support for slide over and split screen mode it’s now clear that Auto Layout is here to stay. If you’re not already developing apps using Auto Layout and Size Classes now is a great time to learn more about them and prepare yourself for any updates to the APIs that Apple introduces at WWDC in June.

Fortunately there’s a lot of great resources to quickly get up to speed and learn the best way to support a variety of devices and size classes in your next app.

Apple’s Documentation

Apple has an excellent Auto Layout guide and a pair of videos from WWDC that explain how Auto Layout works and how to debug the set of constraints in the views of your app. Start with these, experiment with the frameworks and sample code, and then dig into the resources below.

Achieving Zen with Auto Layout

Achieving Zen with Auto LayoutWhile Apple’s documentation is a great place to start, the most comprehensive resource I’ve found is Achieving Zen with Auto Layout by Justin Williams. The 2nd edition has been updated to include the latest information and covers everything from the history of the frameworks to animating and debugging constraints in your app. The $40 ebook and collection of sample code is essential.

Reveal - runtime view debugging

Reveal-noshadow

Xcode includes some visual debugging tools but they pale in comparison to Reveal by Australia’s Itty Bitty Apps. The Reveal framework is dead simple to integrate into your Xcode project and the UI is incredibly slick and easy to use. The ability to inspect and edit constraints live while your app is running is invaluable and alone is worth the price of a license. However, the app includes many other features unrelated to Auto Layout which make it an absolute must have tool for iOS and tvOS development and debugging. Version 1.6 is available now and I’ve heard that version 2.0 will include some awesome new features and changes.

Blog Posts

Finally, the development community has written a number of great posts about Auto Layout and Size Classes. Here’s a few that I’ve bookmarked which I find myself turning back to again and again.

(top image from apple.com)

keep going

More to explore in Build New.

All Build New resources →
let's talk

Got a problem like this one?

Tell us what's stuck. A real person replies within one business day.

Talk to our team →

Talk to people who know software, not a sales script.

Your first call is with Aja, our VP of Sales. He'll help make sure you're solving the right problem. Here's what you'll cover together:

  1. What you're trying to accomplish

    The business goal first, then the technology.

  2. Possible approaches

    And the tradeoffs of each, in plain language.

  3. Risks you may not have considered

    Technical and business, before they cost you.

  4. Whether AI changes the math

    What's practical, and what's just hype for your project.

  5. Sensible next steps

    Even if the right next step is not us.

book-a-call.ics

Loading the scheduler…

Open the booking page →

Some problems are easier to explain in writing. Send us a few lines about what you're working on, and we'll reply within one business day. Helpful to include:

  1. What the software does, or should do
  2. What's stuck, or what's worrying you
  3. Any deadline or budget you have in mind
note.md

Loading the form…