【发布时间】:2011-08-12 04:21:00
【问题描述】:
我想通过代码将 DEBUG 值设置为 1 或 0。在特定事件回答之后而不是从
其他 C 标志?
#if DEBUG==1
#define DBLog(format, ...) NSLog(@"%s:%@", __PRETTY_FUNCTION__,[NSString stringWithFormat:format, ## __VA_ARGS__]);
#define MARK DBLog(@"%s", __PRETTY_FUNCTION__);
#else
#define DBLog(format, ...)
#define MARK
#endif
【问题讨论】:
标签: objective-c xcode c-preprocessor