UIColor使用十六进制的宏

来源:互联网 发布:lte ping时延优化 编辑:程序博客网 时间:2024/05/17 04:01

#define UIColorFromRGB(rgbValue) [UIColor \

colorWithRed:((float)((rgbValue & 0xFF0000) >>16))/255.0 \

green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \

blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

0 0
原创粉丝点击