NSLog debug时打印 release时不打印

创建.h文件,添加以下代码

#ifdef  DEBUG

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

#else

    #define NSLog(...)  {}

#endif

原文地址:https://www.cnblogs.com/tiffany-my/p/7049789.html