赞
踩
打开Xcode项目工程 -> Targets -> Build Settings -> Preprocessor Macros -> ,在Debug状态下点击右侧,“+”添加,在对话框中输入DEBUG=1,并保存,注意别把Release给覆盖了。
#ifdef DEBUG //DEBUG模式 #else //非DEBUG模式 #endif