Like the title says I want to use a color code instead of doing something like this
lblTemp.textColor = [UIColor colorWithRed: 0 green:0x99/255.0 blue:0 alpha:1.0];
for instance I have the following colorcode #30ae36 how can I use this one instead of doing the above.
I use this handy macro:
(I might have gotten it from here, but you can find it in many places. In any case it’s worth reading the discussion about macros vs inline functions at this link.)
If you want to initialize the color from a string (for example from a plist), you can use this: