APP发布的时候输出控制

来源:互联网 发布:linux 登录界面循环 编辑:程序博客网 时间:2024/03/29 13:30

第一步 :在pch中添加 

#ifdef DEBUG

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

#define debugMethod() NSLog(@"%s", __func__)

#else

#define NSLog(...)

#define debugMethod()

#endif


第二步:在 "Target > Build Settings > Preprocessor Macros > Debug" 里有一个"DEBUG=1"


第三步:Edite Schème  设置为release

0 0
原创粉丝点击