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

在PCH文件中定义如下宏

#if DEBUG

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

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

#else

#define NSLog(...)

#define debugMethod()

#endif

原文地址:https://www.cnblogs.com/danMing-love/p/7877856.html