9 lines
241 B
Objective-C
9 lines
241 B
Objective-C
+ (SomeSingleton *) sharedInstance
|
|
{
|
|
static SomeSingleton *sharedInstance = nil;
|
|
static dispatch_once_t onceToken;
|
|
dispatch_once(&onceToken, ^{
|
|
sharedInstance = [[SomeSingleton alloc] init];
|
|
});
|
|
return sharedInstance;
|
|
}
|