You can also add a category to UIColor, so you can use it the same way as when using UIColor. For example, in my application, I add a new file called ApplicationColors, which contains all the colors of my application.
@interface UIColor (ApplicationColours) +(UIColor *)savaColor; @end
Implementation:
@implementation UIColor (ApplicationColours) +(UIColor *)savaColor { return [UIColor colorWithRed:228.0f/255.0f green:86.0f/255.0f blue:86.0f/255.0f alpha:1.0f]; } @end
Then, to use it in my application, I import ApplicationColours.h and use the same as any other UIColor. i.e:
label.textColor = [UIColor savaColor];
source share