Suppose I want to set the background image for a UIView; apparently I do this by calling [UIColor colorWithPatternImage]. Is there any way to determine if a UIColor object has been initialized in this way, i.e., if it is a pattern rather than a solid color?
You could try calling CGColorGetPattern(color.CGColor). This function doesn't document what happens if the color is not a pattern color, but it's reasonable to expect that it will return NULL,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With