随机色产生的宏

来源:互联网 发布:国信金太阳软件手机版 编辑:程序博客网 时间:2024/05/27 14:12


平时开发容易忘记小知识点,防止以后忘记:

#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))


原创粉丝点击