Stack View Baseline Alignment Issue

A horizontal stack view can align text based views on the first or last baseline of the text. Unfortunately the stack view ends up with an incorrect height when the first text view is not the view that extends furthest above/below the baseline. Adding some extra constraints works around the problem.

Read On →

Moving Core Data Files

Using Core Data with an SQLite database and need to move the location of the store or replace the contents? Resist the temptation to use direct file operations and use the persistent store coordinator to do the job for you.

Read On →

Interface Builder Tip for Margin Constraints

If you are using Interface Builder to create constraints it can be a real pain dealing with margins. Sometimes you want to create constraints to a layout margin and sometimes you don’t. Here is a quick tip that makes that job less painful.

Read On →

Preserves Superview Layout Margins

Ever wondered what the “Preserve Superview Margins” checkbox does in Interface Builder? When should you use it and why does it not seem to do anything most of the time? Here are my notes along with an extra step you will need to make it work with stack views.

Read On →

Adding Playgrounds to Xcode Projects

Playgrounds are a great way to try out ideas but I have tended to use them standalone. They also make great companions when added to your Xcode projects. I especially like being able to use the playground live view to preview view and layout code without the need for Interface Builder.

Unfortunately a playground does not automatically get access to the code and resources of a project. Getting it all setup the first time is a pain so for future reference here is my step-by-step guide.

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.