Learn iPhone and iPad cocos2d Game Development
在 .m 文件中
static MyManager *sharedManager = nil; +(MyManager*) sharedManager
{
if (sharedManager == nil)
{
sharedManager = [[MyManager alloc] init];
}
return sharedManager;
}
-
转载请注明来自:http://blog.csdn.net/prevention
iOS Dev (67) 单例的实现,布布扣,bubuko.com
原文地址:http://blog.csdn.net/prevention/article/details/36577599