My UED tell me the color must be #595959 and #333333.
But which delegate method I should use in UIColor to get the color with strings above?
Anyone?
Thank you .
My UED tell me the color must be #595959 and #333333.
But which delegate method I should use in UIColor to get the color with strings above?
Anyone?
Thank you .
@implementation UIColor (Hex)
+ (UIColor *)colorWithHex:(NSUInteger)hex // accepts values like 0x556677
{
CGFloat colors[3];
for(int i=0; i<3; ++i) {
NSUInteger val = hex & 0xFF;
colors[i] = (CGFloat)val/255.0f;
hex >>= 8;
}
return [UIColor colorWithRed:colors[2] green:colors[1] blue:colors[0] alpha:1.0f];
}
@end