发布网友
共1个回答
热心网友
一般Apple已经为我们设置好了 DEBUG 的宏定义,所以,我们只要让 NSLog 在 DEBUG 模式下失效就好了,这样能让我们的程序运行起来更加稳定,同时我们也可以继续使用正规的 NSLog。
//put this in prefix.pch
#ifndef DEBUG
#undef NSLog
#define NSLog(args, ...)
#endif