A singleton is a special kind of class where only one instance of the class exists for the current process. (In the case of an iPhone app, the one instance is shared across the entire app.) Some examples in UIKit are [UIApplication sharedApplication] (which returns the sole instance of the application itself), and [NSFileManager defaultManager] (which returns the file manager instance). Singletons can be an easy way to share data and common methods across your entire app.
Rather than create instances of the singleton class using alloc/init, you'll call a class method that will return the singleton object. You can name the class method anything, but common practice is to call it sharedName or defaultName.
In the implementation (.m) file, you should create a static variable to point to the current instance. There are also a few inherited methods you should customize:
To use the singleton in your code, you'll need to #import the singleton's class header file. Then just call the sharedName class method just as you would any other object: