在网上搜了一下,都是说在prefix.pch文件里加上这么一段
#ifndef __OPTIMIZE__
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...) {}
#endif
我现在的项目都不用prefix.pch了,有没有其他的办法?
PHP中文网2017-04-17 16:14:11
If you want to disable NSLog output in the release version, you must replace NSLog globally. How can you replace NSLog globally without pch...
迷茫2017-04-17 16:14:11
Just because you don’t use it doesn’t mean you can’t use it, create a new one yourself