Quickies

[categories] [index] [all (527)] [latest]

Cocoa Foundation
  1. static MyClass *sharedInstance = nil;
    
    + (MyClass)sharedInstance {
    
        if (sharedInstance == nil) {
            sharedInstance = [[self alloc] init];
        }
    
        return sharedInstance;
    }