Archive for March, 2009
Introduction to Protocols
What follows is a quick introduction to working with protocols. This is good background information to understand as protocols are common in various Cocoa frameworks. A protocol is means to define a list of required and/or optional methods that a class implements. If a class adopts a protocol, it must implement all required methods in [...]
Wolfenstein 3D iPhone Source Code!
There have been just a handful of games over the years that I’ve lost countless hours to, mesmerized and determined to see the games to the end. The first was Rogue, which was on the university BSD system when I was working on my graduate degree. There was something oddly enjoyable about topping your professor’s [...]
Basics of Notifications
What follows is a brief guide to working with Notifications in Cocoa. I’ll cover the basics, including registering an observer and posting notifications, just enough to start using notifications in your iPhone apps. There is an instance of NSNotificationCenter available to every running iPhone application. This class acts as an intermediary to facilitate communication between [...]
iPhone Developer Tips from your iPhone
Earlier today I installed the WPTouch plugin, which makes WordPress blogs readable on an iPhone. It looks really nice from my perspective, however, I’m curious to know if you find this of interest/value? To check it out, visit http://iPhoneDeveloperTips.com or http://iPhoneDevTips.com using Safari on your iPhone. The plugin offers finding content by category, searching for [...]
Adding Compiler Options to Project Templates
In the previous post on GCC and unused values, I made a change to a compiler option such that statements that have no effect are flagged as warnings. Problem is, this change only applies to the current project. For all new projects you create, you will have to make the same change. There is a [...]
Gotcha: GCC and Unused Values
Subtle typos and the problems they bring, it’s enough to drive one nuts. Let me share a recent experience that will shed some light on my most recent experience. Below is a short snippet of code that show something similar to what I was recently attempting to do. It’s nothing more than a variable definition, [...]
Xcode Code Completion Macros
In the previous post I described the basics for working with code completion in Xcode. In this post I will show how you can use built-in text macros to insert various code fragments. As an example, begin by entering ifelse into Xcode and follow this by pressing Control . (control period) and you’ll see the [...]
Xcode Code Completion
What follows is a quick review of how I use code completion in Xcode. Chances are that options and features exist beyond what I’ll cover here, so comments and suggestions are welcome. Let’s say I want to insert a CGRectMake method. I can begin by typing CG and pressing F5 or Option-esc, which will popup [...]
Safari 4 Beta
A little off topic, but a good tip none the less. Apple recently released Safari 4 beta and if you haven’t given it a try, I highly recommend you do.








