senthil.Freelancer senthil.Freelancer - 1 year ago 88
iOS Question

How to convert UIColor value to a named color string?

I need to convert

to an
of the color name.

I tried:

NSString *colorString = NSStringFromClass([[UIColor redColor] class]);

did not give @"redColor".

Answer Source

What do you want to do that for? Have a look at generic -desciption method for a start

UIColor* someColor = ...//Initialize color
NSString* colorString = [someColor description];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download