static RootViewController *shareRootViewController = nil;
+(RootViewController *)sharedController{
@synchronized(self){
if(shareRootViewController == nil){
shareRootViewController = [[[self alloc] init] autorelease];
}
}
return shareRootViewController;
}
+(id)allocWithZone:(NSZone *)zone{
@synchronized(self){
if (shareRootViewController == nil) {
shareRootViewController = [super allocWithZone:zone];
return shareRootViewController;
}
}
return nil;
}