Apple gives a good sample on how to create a singleton class; I've modified it a bit for iOS programming:
- Used "sharedInstance" method and variable name to make it easier to copy paste.
- - (void) release to - (oneway void) release
The singleton sample produces a warning in the release method because NSObject uses the "oneway" return type modifier. It's basically an indication that the method is used for asynchronous messages. For more details on what oneway does, toodarkpark.net offers a good explanation.