您的位置:首页 > 其它

完美解决Xcode8.0之后版本NSLog打印输出不全

2016-12-02 11:16 555 查看
/**

 *  完美解决Xcode NSLog打印不全的宏 亲测目前支持到8.2bate版

 */

#ifdef DEBUG

//#define NSLog(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] )

#define NSLog(...) printf("%f %s\n",[[NSDate date]timeIntervalSince1970],[[NSString stringWithFormat:__VA_ARGS__]UTF8String]);

#else

#define NSLog(format, ...)

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: