NSlog 对于新手的一点技巧和用法.
#ifdef DEBUG # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DLog(...) #endif // ALog always displays output regardless of the DEBUG setting #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
if 语句里面的只会在dubug下打印信息. 在release下是不起作用的,Alog 是在任何模式在都会打印
毕竟打印一些信息的时候,我们只是自己调试用.
生活令人怀念