iOS打印输出

#ifdef DEBUG
#define DMString [NSString stringWithFormat:@"%s", __FILE__].lastPathComponent
#define NSLog(...) printf("%s第%d行: %s\n\n", [DMString UTF8String] ,__LINE__, [[NSString stringWithFormat:__VA_ARGS__] UTF8String]);
#else
#define NSLog(...)
#endif

你可能感兴趣的:(iOS基础知识)