美文网首页
ios10 nslog打印不全的bug

ios10 nslog打印不全的bug

作者: 走道牙的人 | 来源:发表于2016-11-25 16:57 被阅读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

相关文章

网友评论

      本文标题:ios10 nslog打印不全的bug

      本文链接:https://www.haomeiwen.com/subject/mbhwpttx.html