Changing Root View Layout Margins

When Apple introduced layout margins in iOS 8 they made the decision to have the system manage the margins of a view controller’s root view. This allowed them to vary the left/right margins depending on the size class (16 points for compact width and 20 points for regular). The downside was that you could not alter these margins. That changed in iOS 11.

Read On →

Stack View Custom Spacing

When Apple introduced stack views in iOS 9 they made it much easier to use Auto Layout by reducing the number of constraints you needed to create yourself for many common layouts. One edge case that was not well covered was the need for custom spacing between views. You could do it by nesting stack views but that always seemed an unnecessary complication. In iOS 11 you can create stack views with custom spacing between views.

Read On →

Safe Area Layout Guide

Apple introduced the topLayoutGuide and bottomLayoutGuide as properties of UIViewController way back in iOS 7. They allowed you to create constraints to keep your content from being hidden by UIKit bars like the status, navigation or tab bar. These layout guides are deprecated in iOS 11 and replaced by a single safe area layout guide.

Read On →

WWDC 2017 Viewing Guide

Another year, another WWDC and yet more session videos to catch up on. Here is my guide to the sessions I found most interesting this year.

Read On →

Warning Converting Optional to String

If you have converted a project to Swift 3.1 you have no doubt come across the slightly annoying warning about String interpolation for an optional value.

Read On →
Archives Categories
No time to watch WWDC videos?

Sign up to get my iOS posts direct to your inbox and I will send you a free PDF of my 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.