Created
September 12, 2008 20:10
-
-
Save sbrocket/10508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static OptionsViewController *OVCSharedInstance; | |
+(OptionsViewController*)sharedController { | |
if (!OVCSharedInstance) { | |
OVCSharedInstance = [[OptionsViewController alloc] initWithStyle:UITableViewStyleGrouped]; | |
NSAssert(OVCSharedInstance!=nil,@"Didn't allocate singleton."); | |
} | |
return OVCSharedInstance; | |
} | |
+(id)allocWithZone:(NSZone*)zone { | |
NSAssert(OVCSharedInstance==nil,@"Attempted to allocate a second instance of a singleton."); | |
return [super allocWithZone:zone]; | |
} | |
-(id)retain { | |
return self; | |
} | |
-(UINT)retainCount { | |
return UINTMax; | |
} | |
-(void)release { | |
} | |
-(id)autorelease { | |
return self; | |
} | |
-(id)copyWithZone:(NSZone*)zone { | |
return self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment