在你的<AppName>-Prefix.pch文件中,加入下面的代码,就能在发布(Release)版本中屏蔽掉代码中的NSLog输出 #ifdef DEBUG # define NSLog(...) NSLog(__VA_ARGS__) #else # define NSLog(...) ((void)0) #endif