(IOS)随机颜色

+ (UIColor*)RandomColor {

    NSIntegeraRedValue =arc4random() %255;

    NSIntegeraGreenValue =arc4random() %255;

    NSIntegeraBlueValue =arc4random() %255;

    UIColor*randColor = [UIColorcolorWithRed:aRedValue /255.0fgreen:aGreenValue /255.0fblue:aBlueValue /255.0falpha:1.0f];

    returnrandColor;

}

你可能感兴趣的:((IOS)随机颜色)