UIColor category for getting colors from hex value
Just copy files into your project and include UIColor+colorWithHex.h
.
If you need an UIColor *
object with hex value #bacd12
use colorWithHex:
method.
UIColor *color = [UIColor colorWithHex:0xbacd12]
For using color with alpha, you can use colorWithHex:withAlpha:
UIColor *color = [UIColor colorWithHex:0xff00ff withAlpha:0.5f]