标签:io ar os sp on bs nbsp 设计 ios
#import "ZBAccountInfo.h"
@interface ZBAccountInfo()
@end
static ZBAccountInfo *sharedObj = nil;
@implementation ZBAccountInfo
+(ZBAccountInfo *)sharedInstance{
@synchronized (self)
{
if (sharedObj == nil)
{
sharedObj= [[self alloc] init];
}
}
return sharedObj;
}
+(id)allocWithZone:(struct _NSZone *)zone{
@synchronized (self) {
if (sharedObj == nil) {
sharedObj = [super allocWithZone:zone];
return sharedObj;
}
}
return sharedObj;
}
@end
标签:io ar os sp on bs nbsp 设计 ios
原文地址:http://www.cnblogs.com/zhibin/p/4122012.html