Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NSLog(@"示例");
将输出:
2012-09-13 04:54:48.128 MyApp [94652:a0f]:示例
在控制台上。
有没有办法让它只输出:
例子
如果您定义此宏并使用它而不是 NSLog 它只会输出您指定的内容。
#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);