I have a UIColor+MyLayout.m file such as:
@implementation UIColor (Layout)
- (UIColor *) textBackground
{
UIColor *lightGreen = [UIColor colorWithRed:0.0f/255.0f green:178.0f/255.0f blue:238.0f/255.0f alpha:1.0f];
return lightGreen;
}
@end
I have added the .h file to my viewcontroller.m, but how do I call this into a UIColor?
UIColor *myColor = ?
Would be better if you do the following:
@implementation UIColor (Layout)
+ (UIColor *) textBackground {
UIColor *lightGreen = [UIColor colorWithRed:0.0f/255.0f green:178.0f/255.0f blue:238.0f/255.0f alpha:1.0f];
return lightGreen;
}
@end
And then just call it UIColor *myColor = [UIColor textBackground];