1、iOS开发-NSLog不打印设置
//在 "Target > Build Settings > Preprocessor Macros > Debug" 里有一个"DEBUG=1"。
//设置为Debug模式下,Product-->Scheme-->SchemeEdit Scheme-->Build Configuration
//设置成Debug时,就可以打印nslog了
//设置Release,发布app版本的时候就不会打印了,提高了性能
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#define debugMethod() NSLog(@"%s", __func__)
#else
#define NSLog(...)
#define debugMethod()
#endif
转自:http://www.2cto.com/kf/201401/275064.html