- (UIColor *)randomColor {
int R = (arc4random() % 256) ;
int G = (arc4random() % 256) ;
int B = (arc4random() % 256) ;
return [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1];
}
- (UIColor *)randomColor {
int R = (arc4random() % 256) ;
int G = (arc4random() % 256) ;
int B = (arc4random() % 256) ;
return [UIColor colorWithRed:R/255.0 green:G/255.0 blue:B/255.0 alpha:1];
}
本文标题:ios 生成随机颜色
本文链接:https://www.haomeiwen.com/subject/kgkwtrtx.html
网友评论