标签:
#define FUIColorFromRGB(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] //假如颜色值是 #f9f9f9 使用方法如下 backVieww.backgroundColor = FUIColorFromRGB(0xf9f9f9);
#pragma mark - 颜色 #define RGBACOLOR(R,G,B,a) [UIColor colorWithRed:(R)/255.0f green:(G)/255.0f blue:(B)/255.0f alpha:(a)] //使用方法 backVieww.backgroundColor = RGBACOLOR(226, 226, 226, 1);
标签:
原文地址:http://my.oschina.net/linxiaoxi1993/blog/476781