iOS---UIColor随机生成颜色的方法

随机色产生的宏:

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

#define randomColor random(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))

你可能感兴趣的:(iOS---UIColor随机生成颜色的方法)