美文网首页
iOS---UIColor随机生成颜色的方法

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

作者: BabyNeedCare | 来源:发表于2018-11-28 15:28 被阅读0次

随机色产生的宏:

#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随机生成颜色的方法

      本文链接:https://www.haomeiwen.com/subject/uitzqqtx.html