Singletons are single-instance objects for OSX or iOS programming projects. In objective-c they are only invoked once and have special handling for retain and release during memory management. There is a good example from Apple about how to make your own Singleton, but I found a great project on GITHub to a simple .h which is essentially a macro that can be included with any project. The macro will generate all the necessary methods automatically and make an object into a singleton.

Additional Links
Singletons, AppDelegates and top-level data
iPhone Dev Sessions: Using Singletons

UPDATE: Singletons have been greatly simplified, see post here.

Comments are closed.



  • slide
  • slide
  • slide
  • slide
Casino Canada Online