这样写的目的是:可以在不需要NSLog的时候将其注释掉
具体原因链接: 链接一 链接二
#ifdef DEBUG #define NSLog(...) NSLog(__VA_ARGS__) #defin...
#define CLog(format, ...) NSLog(format, ## __VA_ARGS__)#d...
#ifdef DEBUG#define XPFLog(...) NSLog(__VA_ARGS__)#else#d...
自定义打印输出#ifdef DEBUG#define HCLog(...) NSLog(__VA_ARGS__)#...
define HK_DEBUG_LOG(...) NSLog(VA_ARGS) 这样写的目的是:可以在不需...
NSLog(@"%@", NSStringFromClass([self class])); NSLog(@"%@...
NSLog(@"%02ld",5); NSLog(@"%0.2f",0.2789); NSLog(@"%0.2f"...
NSLog(@"%02ld",8); NSLog(@"%0.2f",0.2694); NSLog(@"%0.2f"...
NSLog(@"on value: %@" ,on?@"YES":@"NO"); NSLog(@"%@",/* D...
# 作用:将参数转换为字符串 例子1: 输出:a:1 例子2: 输出:the square of 2 is 4 V...
本文标题: NSLog(__VA_ARGS__)
本文链接:https://www.haomeiwen.com/subject/xludlttx.html
网友评论