NSLog debug时打印 release时不打印 创建.h文件,添加以下代码 #ifdef DEBUG #define NSLog(...) NSLog(__VA_ARGS__) #else #define NSLog(...) {} #endif