![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
单例模式
AldisZhan
We are the heroes of our time.
But we're dancing with the demons in our minds.
展开
-
Objective-C 单例模式写法以及单例模式模板宏
Objective-C Singleton 单例模式解析,单例模式就是只有一个实例,确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例,这个类称为单例类。objective c 单例模式,objective c 设计模式,objective c singleton 。单例指一个唯一的,由全局共享的对象,单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例,这原创 2012-08-28 22:03:26 · 3879 阅读 · 5 评论 -
Objective C ARC下的单例模版宏 ARC Singleton template
之前写过一篇关于非ARC的单例模版宏的文章地址但现在ARC的使用越来越广泛,原来的模版宏可能已经不是很适应,那介绍一下ARC版的模版宏的写法和用法写法ARCSingletonTemplate.h#define SYNTHESIZE_SINGLETON_FOR_HEADER(className) \\+ (className *)shared##class原创 2012-12-07 02:19:50 · 4991 阅读 · 3 评论