单例的实现方式之易做图方法
+ (SingletonObject *)shareInstance;
+ (SingletonObject *)shareInstance {
static SingletonObject *__singletion;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
__singletion=[[self alloc] init];
});
return __singletion;
}
补充:移动开发 , IOS ,