Announcing Modern Auto Layout

Is learning Auto Layout making your head spin? About to throw your Mac out the window in frustration? Maybe I can help. It’s been a while in the making but today’s the day I launch my new book on Modern Auto Layout.

Just want the book? Go straight to the checkout.

Why Is Auto Layout So Hard?

When I ask iOS developers what part of their job they struggle with one of the top answers is Auto Layout. What makes it so hard? Let’s make a list…

  1. It’s hard to know when you’re done. How many constraints do you need? Where should you create your constraints?

  2. Horizontal and vertical content-hugging and compression-resistance priorities. Need I say more? Every view has four priorities. Flexibility is great, but it’s hard to imagine a more complicated mechanism for controlling what gets stretched and squeezed.

  3. You don’t have a good mental model for what the layout engine is doing. Auto Layout feels like a closed magic box. You feed it some constraints, and a layout pops out that may or, more often, may not be what you wanted.

  4. Heard that you should start with stack views? They help but do a bad job of hiding complexity. You still need some constraints and there’s no escaping the twin horrors of content-hugging and compression resistance priorities. I have ranted about some stack view oddities and bugs before. Stack views are a huge time saver, but I wouldn’t learn them first.

  5. Auto Layout is a descriptive layout system, but it’s a low-level description. You still need to do most of the work to make modern adaptive layouts.

I could go on…

Layout Is More Than Auto Layout

It’s not enough to know Auto Layout these days. Modern iOS apps need to adapt to a wide range of situations:

Dynamic sizing needs a dynamic layout. That means building for dynamic type, readable content, self-sizing table view cells, size classes and more. You don’t have to use Auto Layout, but many of the above challenges become manageable when you do.

What Is Modern Auto Layout?

What do I mean by Modern Auto Layout? I think of it as the version of Auto Layout that Apple introduced in iOS 9 and has refined and improved in each release since then:

What’s In The Book?

The first part of the book covers the fundamentals of Auto Layout. The key concepts that make it work and the tools to apply it to your layouts:

With the foundation built the second part of the book looks at how to use Auto Layout with related API’s to build adaptive layouts.

Buy Modern Auto Layout

What's Included?
Modern Auto Layout book cover
  • Multiple formats: PDF (446 pages), ePUB (iBooks) and MOBI (Kindle)
  • DRM free. Read on all of your devices that support PDF, ePUB or MOBI formats, without restriction.
  • Written for Xcode 10, Swift 4.2 and iOS 12.
  • 75 sample Xcode projects available for download from the book's source code repository.
  • 32 layout challenges to practice your layout skills as you learn. Full solutions in the book's source code repository.

Learn More

Read more about the book, download a preview with the full table of contents, introduction, and chapter 7 on layout priorities or go straight to checkout.

Never miss a post

iOS Size Classes Cheat Sheet

Subscribe and also get my free iOS Size Classes Cheat Sheet

Success! Now check your email to confirm your subscription and download your free guide to iOS Size Classes.

There was an error submitting your subscription. Please try again.

Unsubscribe at any time. See Privacy Policy
No time to watch WWDC videos?

Sign up to get my iOS posts and news direct to your inbox and also get my free iOS Size Classes Cheat Sheet

OK! Check your inbox (or spam folder) for an email to confirm your details and download your free guide to iOS Size Classes.

There was an error submitting your subscription. Please try again.

Unsubscribe at any time. See Privacy Policy
Archives Categories