Xcode打印JSON不全 iOS

 

换成c函数的printf就完美解决问题。

#ifndef __OPTIMIZE__
#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
#define NSLog(...) {}
#endif

之前系统默认的 NSLog不行。会出现打印不全。需要改为上面的printf

#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif

 

posted @ 2024-07-22 15:39  黄增松  阅读(8)  评论(0编辑  收藏  举报