IOS开发中发布的时候取消日志打印

 

在PCH文件中定义如下宏

 

#if DEBUG

#define NSLog(...) NSLog(__VA_ARGS__)

#define debugMethod() NSLog(@"%s",__func__)、

#else

#define NSLog(...)

#define debugMethod()

#endif

 

posted @ 2017-11-22 10:06  日月哥哥  阅读(146)  评论(0编辑  收藏  举报