1. nslog输出与否 #ifdef DEBUG #define XFLog(…) NSLog(VA_ARGS) #else #define XFLog(…) #endif 2 .RGB颜色 define XFColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] 3 随机色 define XFRandomColor XFColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))