But NSLog will build at release mode.
So we can use these code to do it.
#ifdef DEBUG
#define debug_NSLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define debug_NSLog(format, ...)
#endif
Then we need to edit Xcode setting, click Project => Edit Active Target "MyProject" to open dialog.
Edit GCC_PREPROCESSOR_DEFINITIONS item and add DEBUG keyword.
沒有留言:
張貼留言
Hello