预处理消除NSLog

 

pch中:

 

#ifndef __OPTIMIZE__

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

#else

#define NSLog(...) {}

#endif

 

 __OPTIMIZE__ 这个宏是用来标识是否是release的。

选择edit scheme菜单项编辑 ,选择info标签,将build configuration(编辑配置)修改为release。这里说明下编译配置各个项的含义: debug是为调试编译而配置的,release 是为了发布编译而配置的。

posted on 2015-05-05 10:16  Andy_Capricorn  阅读(94)  评论(0编辑  收藏  举报

导航