Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (14 sloc) 393 Bytes
// Shared Singleton
// Class method that returns a singleton instance
//
// Platform: All
// Language: Objective-C
// Completion Scope: Class Implementation
+ (<#class#> *)shared<#name#> {
static <#class#> *_shared<#name#> = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_shared<#name#> = <#initializer#>;
});
return _shared<#name#>;
}