Singleton.h(单例工具类,快速为类添加单例)

快速创建单例,两句话实现单例功能。
在.h文件中添加:
singleton_interface(JMProjectManager)
在.m中添加:
singleton_implementation(JMProjectManager)

使用:
[JMProjectManager sharedJMProjectManager]

借鉴框架中的JMProjectManager。

你可能感兴趣的:(Singleton.h(单例工具类,快速为类添加单例))