Learning Auto Layout for iOS, tvOS, and OS X

Learning Auto Layout for iOS, tvOS, and OS X

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.


Swift Link Dump

Apple Swift Logo

Apple surprised the Mac and iOS developer community at WWDC with the announcement of Swift, a new language for developing apps for OS X and iOS. With each beta release of iOS 8, Yosemite, and Xcode 6 the language has been evolving and the community has been quick to follow.

I’ve been saving links from Twitter and my RSS feeds since WWDC, here’s the best so far:

Language Basics

Swift Blogs





YapDatabase – A Great SQLite-Based Alternative to Core Data

YapDatabase – A Great SQLite-Based Alternative to Core Data

Synchronization and Core Data in Modern iOS Apps

I’m working on an iOS project that synchronizes a lot of data between a web service and an iPad app. We’ve relied on the advice and research in the fantastic issues of objc.io on Core Data and Syncing Data along with performance recommendations from Florian Kugler’s research into Core Data stack configuration and overall the solution is working pretty well for us at this point, but it hasn’t been without its challenges.

Throughout the project I’ve been trying to follow industry news and research to keep up with best practices, interesting sync experiments, and usage of Core Data in iOS 7. A recurring question in much of this is whether to use Core Data at all, and if not what you give up and what can you possibly gain in the process?

Brent Simmons’ series of Vesper Sync Diary posts (linked to below) cover this design and decision process in incredible detail and are well worth the read, culminating with his Hard Core post where he ultimately decides to go ahead with a SQLite based solution instead of using Core Data. When using SQLite the go to solution for Mac or iOS is Gus Mueller’s excellent fmdb framework, however another SQLite based solution with a higher level API and different approach has emerged that is well worth a look too, called YapDatabase. (more…)

Digging Into the Objective-C Runtime

Digging Into the Objective-C Runtime

Greg Parker recently tweeted a link to fantastic site he created, An Illustrated History of objc_msgSend, that provides a trip through history of one of the likely most often called, but unheard of functions in iOS or OS X, objc_msgSend. The function dates back to NeXT and the origins of Mac OS and iOS. It’s interesting to see how it has evolved through the versions of the OS, the transitions between processor architectures, and how priorities in the algorithm have changed as hardware has. It was the underpinning of the Objective-C runtime back on those first PowerPC based Macs and still is today on the latest A7 based iOS devices. Incredible.

If you want to learn more about the Objective-C runtime it’s actually open source and is available from Apple’s open source site at objc4-555.1. To go along with the source Apple provides the Objective-C Runtime Programming Guide and Objective-C Runtime Reference. Definitely read through these and take the time to learn more about how the runtime and your modern Objective-C code are related.

Outside of Apple’s documentation, perhaps the best series of posts on the Objective-C runtime and how you can use it are by Mike Ash. Despite the fact that they date back to 2009 and 2010, they’re still very relevant today.

Finally, if you’re looking to do some hacking on the runtime itself, or experiment with patterns and practices from other languages check out libextobjc by Justin Spahr-Summers, one of the Mac developers at GitHub.

Thanks again to Greg Parker for the retrospective, his time spent hacking away on the runtime, and for the inspiration for this post!

Contact Us