I haven't used too many class methods before, but I found myself needing a custom color for my app.
I was using an instance variable for the color, but I thought about just using using a category on UIColor. Would the new method really be just as simple as:
Hope that's not too lame of a question. I don't have much experience with class methods or categories.
I was using an instance variable for the color, but I thought about just using using a category on UIColor. Would the new method really be just as simple as:
Code:
+ (UIColor *)customColor
{
UIColor *color = [UIColor colorWithRed: 0.36 green: 0.24 blue: 0.36 alpha: 1.000];
return color;
}
Hope that's not too lame of a question. I don't have much experience with class methods or categories.