10 lines
235 B
Objective-C
10 lines
235 B
Objective-C
+ (SomeSingleton *) sharedInstance
|
|
{
|
|
static SomeSingleton *sharedInstance = nil;
|
|
@synchronized(self) {
|
|
if (!sharedInstance) {
|
|
sharedInstance = [[SomeSingleton alloc] init];
|
|
}
|
|
}
|
|
return sharedInstance;
|
|
}
|