2014年6月12日

摘要: 有些变量只需要初始化一次(如从文件中读取配置参数,读取设备型号等等),可以使用dispatch_once来进行读取优化,保证只调用API一次,以后就只要直接访问变量即可范例如下:staticBOOLisTestMode;+(BOOL)isTestMode{staticdispatch_once_to... 阅读全文

posted @ 2014-06-12 11:35 郑博文 阅读(148) 评论(0) 推荐(0) 编辑


Copyright © 2024 郑博文
Powered by .NET 8.0 on Kubernetes