by Bob McCune on April 8, 2011
The Factory pattern is a frequently used creational pattern to help abstract the creation of an object from its clients. Although there are a few specializations of this pattern I’ll focus on the most commonly used approach and then look at how we can leverage the Objective-C Runtime to make this solution more robust. Let’s [...]
by Bob McCune on March 13, 2011
This past week I gave a presentation on Core Animation to the Minnesota CocoaHeads user group. Core Animation is a truly amazing framework and is really the magic ingredient in the iOS user experience. Understanding how to effectively use it can allow you to add new levels of realism and interactivity to your apps. As [...]
by Bob McCune on March 8, 2011
A common need in an iOS app is to tile a background image on a UIView. It’s trivial to implement, but not particularly obvious if you’re new to the platform. The solution is to set the view’s backgroundColor property to a UIColor instance created from your pattern image. For instance, the following code will create [...]
by Bob McCune on January 31, 2011
Cocoa has long defined the IBAction and IBOutlet keywords. These keywords provide metadata hints to Interface Builder providing it some understanding of your underlying code so you can graphically wire instance variables and properties and set target-action behaviors. For instance, whenever you need a pointer to NIB-defined object you would create a property defined as: [...]
by Bob McCune on June 16, 2008
I would really like to thank all of you who attended the inaugural CocoaHeads meeting last Thursday. I couldn’t have been happier with the turnout and participation from everyone. It was also nice to finally meet many of you with whom I’ve traded emails over the past couple of months. We had a great mix [...]
by Bob McCune on May 20, 2008
Over the weekend, I finished reading the 3rd edition of Cocoa Programming for Mac OS X by Aaron Hillegass. The previous edition had long been considered the best introduction to the topic, but it had grown rather out of date given the major changes introduced in the Leopard release of OS X. Thankfully, the 3rd [...]
by Bob McCune on March 13, 2008
Over the past few months I’ve been spending a lot my free time learning Objective-C and Cocoa. Although it’s been fun learning a new language and framework, it has been somewhat of an uphill climb. Objective-C was the easy part. If you have some familiarity with C and also some experience with an OO language [...]
by Bob McCune on February 3, 2008
For the past few months I’ve been spending a considerable amount of my free time learning Objective-C and Cocoa. Apple’s Leopard release has introduced so many new and interesting developer technologies that I decided it was finally time to dive in and learn to write code for my favorite platform. One of the new Leopard [...]