March 26 10
Quick intro to NSRunLoop NSRunLoop is the object that manages the big event loop in the sky. Imagine you’re writing your own graphical OS. Â A common way to build your control flow is with a loop like this: while(!UserRequestedShutDown(userInput)) { userInput = GetUserInput(); KeyApplicationHandleUserInput(userInput); } The loop continuously gathers and reacts to the user’s actions […]
March 16 10
In this post, I’ll enumerate four major types of callback mechanisms in Objective-C, and mention some comparisons to help choose the best one for whichever class you’re designing. Intuitively, a callback is a method that you think of as being called from outside your code. More formally, a callback is a method that can be […]
March 13 10
One of the first big confusions I confronted when learning to work with xcode and Interface Builder was the connection between things in my code (particularly those marked as IBOutlets or IBActions) and corresponding things in Interface Builder. Â In many languages, you expect every file you work with to be explicitly mentioned by name somewhere […]
March 13 10
Ok, this is the obligatory blog intro explaining what the blog is about. iPhone OS coders, this blog is for you. As I’ve learned Cocoa Touch and become proficient in working with the iPhone SDK and related libraries and tasks, I’ve seen a lot of trouble spots that I’m sure affect many other coders as […]