iOS NSlog打印数据不完全,xcode处理办法

#ifdef DEBUG //调试

#define NSLog(FORMAT, ...) fprintf(stderr, "%s:%zd\t%s\n", [[[NSString stringWithUTF8String: __FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat: FORMAT, ## __VA_ARGS__] UTF8String]);

#else // 发布

#define NSLog(FORMAT, ...) nil

#endif

在项目中的.pch文件中添加可全局使用。

posted on 2019-08-01 11:49  高彰  阅读(610)  评论(0编辑  收藏  举报

导航