ios10 nslog打印不全的bug

2016-11-25  本文已影响231人  走道牙的人

解决方法:使用prinf()替代nslog

#ifdef DEBUG
#define KSLog(format, ...) printf("class: <%p %s:(%d) > method: %s \n%s\n", self, [[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, __PRETTY_FUNCTION__, [[NSString stringWithFormat:(format), ##__VA_ARGS__] UTF8String] )
#else
#define KSLog(format, ...)
#endif
上一篇 下一篇

猜你喜欢

热点阅读