I have a UIColor created by [UIColor colorWithPatternImage:...];
and I want to store it in an NSArray.
I have a problem, however, as I have the following code for normal colors
NSString *NSStringFromUIColor(UIColor *color) {
//Creates a string with RGB values of the color
const CGFloat *components = CGColorGetComponents(color.CGColor);
return [NSString stringWithFormat:@"[%f, %f, %f, %f]",
components[0],
components[1],
components[2],
components[3]];
}
But the above crashes with my unconventional patternColorFromImage. So once again, how do I store this color in an NSArray etc?
Thanks