The link below provides a fast and easy solution in the way of the following macro:
#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]
This macro can be called like this:
UIColorFromRGB(0x00FFEE)
http://cocoamatic.blogspot.com/2010/07/uicolor-macro-with-hex-values.html
No comments:
Post a Comment