A Singleton superclass
Download (right click, save as, rename as appropriate)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#import <Foundation/Foundation.h> @interface Singleton : NSObject { } + (id) sharedInstance; #if (TARGET_OS_IPHONE) - (NSString *)className; + (NSString *)className; #endif @end