Understanding the iOS Layer Drawing & Display Hierarchy

drawRect: aside, inspired by this Stack Overflow post, Hari discusses no less than 5 other places where custom drawing code might be implemented.

Building an iOS Photo-sharing and Geolocation Mobile Client and API

What it says. Mattt‘s excellent step-by-step to building a full stack application (iOS client with a Rails server backend) using Heroku.

Behind The App: Repeat Timer Pro

An informative overview of the design and development process for a popular utility app by it’s creator, Artem Lapitski.

Objective-C Debugging With Xcode 4

An excellent twopart tutorial from Matthijs Hollemans that reviewing the most common causes of Objective-C runtime crashes and how to debug them.

Worth a look, even for the experienced developer.

Objective-C literals

In case you missed it: they’re here.

Cocoa Comparisons

Mark Dalrymple compares isEqual:, isEqualToString: and compare: and finds them unequal… but in ways you might not expect! I didn’t know compare: would always return NSOrderedSame for a nil receiver, for example.

Simple and Reliable Threading with NSOperation

Useful tech note from Apple about navigating some of the murkier waters of concurrency using NSOperation. Contains this great explanation of how GCD relates to NSOperation:

… these two technologies complement each other nicely. GCD is a low-level API that gives you the flexibility to structure your code in a variety of different ways. In contrast, NSOperation provides you with a default structure that you can use for your asynchronous code. If you’re looking for an existing, well-defined structure that’s perfectly tailored for Cocoa applications, use NSOperation. If you’re looking to create your own structure that exactly matches your problem space, use GCD.

Disconnect

Excellent advice from Numar Faraz:

Life is pretty awesome when you live it outside.

Four weeks ago I had the privilege of becoming a father to a beautiful little girl named Holly. Awesome indeed.

This blog lives on, but apologies if my updates continue to be erratic as ever…

Xcode, git and .DS_Store

· Code

On trying to merge two git branches, I’ve often found Xcode 4 displays “Branches not found” in the Merge dialog, despite the Organiser clearly recognising multiple branches for the repo.

It seems the problem occurs because Xcode believes the working copy has uncommitted changes (even though the Commit dialog clearly shows there’s nothing to commit). The reason is that Xcode 4 doesn’t instruct git to ignore system invisible files, specifically .DS_Store (see rdar://8951416).

Turns out the workaround isn’t hard, just create a global excludes file:

git config --global core.excludesfile ~/.gitignore

… and ensure .DS_Store is ignored:

echo .DS_Store >> ~/.gitignore

Xcode will then allow you to merge branches or perform any other operation that was being prevented because it incorrectly thought there was something to commit.

View Orientation

Michael Tyson’s TPMultiLayoutViewController seamlessly changes nibs according to the device’s orientation.