随机颜色文件 用的时候直接推进去好方便
#import <UIKit/UIKit.h>
@interface UIColor (RandomColor)
//随机颜色
+ (UIColor *)randomColor;
@end
@interface UIColor (RandomColor)
//随机颜色
+ (UIColor *)randomColor;
@end
#import "UIColor+RandomColor.h"
@implementation UIColor (RandomColor)
+ (UIColor *)randomColor {
return [self colorWithRed:arc4random() % 256 / 255.0 green:arc4random() % 256 / 255.0 blue:arc4random() % 256 / 255.0 alpha:1.0];
}
@end

浙公网安备 33010602011771号