ios随机颜色

#ifdef __OBJC__

    #import <UIKit/UIKit.h>

#import <Foundation/Foundation.h>

#import "UIView+Extension.h"

 

// 颜色

#define HMColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]

#define HMColorRGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]

 

// 随机色

#define HMRandomColor HMColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))

#endif

 

posted @ 2016-01-26 11:56  xiaocaoera  阅读(1735)  评论(0编辑  收藏  举报