摘要: NSOperation 是基于oc的,//创建一个队列 非主队列NSOperationQueue *queue =[NSOperationqueue alloc]init];//现在最大开启的线程queue.maxConcurrentOperationCount=2;//添加操作到队列中(自动异步执... 阅读全文
posted @ 2015-08-07 14:52 Lee_M 阅读(123) 评论(0) 推荐(0) 编辑
摘要: // .h文件#define HMSingletonH(name) + (instancetype)shared##name;// .m文件#if __has_feature(objc_arc) #define HMSingletonM(name) \ static id _instac... 阅读全文
posted @ 2015-08-07 11:54 Lee_M 阅读(196) 评论(0) 推荐(0) 编辑
摘要: // .h文件#define HMSingletonH(name) + (instancetype)shared##name;// .m文件#define HMSingletonM(name) \static id _instance; \ \+ (id)allocWithZone:(struct ... 阅读全文
posted @ 2015-08-07 11:29 Lee_M 阅读(99) 评论(0) 推荐(0) 编辑
摘要: // .h文件#define HMSingletonH(name) + (instancetype)shared##name;// .m文件#define HMSingletonM(name) \static id _instance; \ \+ (id)allocWithZone:(struct ... 阅读全文
posted @ 2015-08-07 11:14 Lee_M 阅读(111) 评论(0) 推荐(0) 编辑