摘要: 这几天看GCD,居然可以实现单例:- (id) sharedInstance{ static MySingleton *SharedInstance = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ SharedInstance = [MySingleton new]; }); return SharedInstance; } 阅读全文
posted @ 2012-07-10 17:11 宸垣 阅读(255) 评论(0) 推荐(0) 编辑