常用的颜色宏定义

// 获得当前的版本

#define iOS(version) ([UIDevice currentDevice].systemVersion.doubleValue >= (version))

#define ColorA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)/255.0]

#define Color(r, g, b) ColorA((r), (g), (b), 255)

#define RandomColor Color(arc4random_uniform(255), arc4random_uniform(255), arc4random_uniform(255))

posted on 2017-01-06 16:30  1018475062  阅读(245)  评论(0编辑  收藏  举报