Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all..

Is there any method which will give me a UIColor, provided i gave a valid colorName as String ??

I am having aPlist which will tells the app to set which backColor, textColor etc.... etc...

My app will read that and set the color...

Instead of a longer " Switch and case" i am searching for a method which will return the Color.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
If it was an instance method then you could get a selector and use the normal method to perform the selector.

I'm not clear if you can do this with class methods or not. You could try something like:

Code:
[UIColor performSelector:NSSelectorFromString(@"blackColor")];

and see if it works (I'm not on a Mac to try it myself...)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.