IOS release 版本的时候 去掉输出log NSLog

在.pch文件中添加下面一段

#ifndef __OPTIMIZE__

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

#else

#define NSLog(...) {}

#endif

 

如何添加 pch 文件,xcode - new file -pch file。   将Precomplie Prefix Head  修改为 yes    将 Prefix Header路径设置为 $(SRCROOT)/xxxx.pch

posted on 2015-06-27 10:12  景树园  阅读(510)  评论(0编辑  收藏  举报

导航