我们可以为UIcolor添加一个category方便使用
+ (UIColor *)randomColors{
return [UIColor colorWithRed:arc4random() % 256 / 255.0 green:arc4random() % 256 / 255.0 blue:arc4random() % 256 / 255.0 alpha:1.0];
}
就是这么简单!!!
我们可以为UIcolor添加一个category方便使用
+ (UIColor *)randomColors{
return [UIColor colorWithRed:arc4random() % 256 / 255.0 green:arc4random() % 256 / 255.0 blue:arc4random() % 256 / 255.0 alpha:1.0];
}