在Build settings —> PrefixHeader ,设置到工程文件那一级就好
调试DEBUG
#ifdef DEBUG
#define TSLog(...) NSLog(__VA_ARGS__)
#else
#define TSLog(...)
#endif
#define TSLogFunc TSLog(@"%s",__func__)
//RGB颜色
#define TSRGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define TSGlobalBg TSRGBColor(223, 223, 223)
本文介绍如何在Xcode中正确配置工程的前缀头文件,并提供了一种灵活的调试宏定义方法。此外,还给出了定义颜色宏来简化UIColor使用的示例。
691

被折叠的 条评论
为什么被折叠?



