views:

162

answers:

3

Does any one know the color of labels in the address book? For example when you open a contact you can observe the color of "phone" or "home" labels. So what is that color? Do you have any idea?

Any help greatly appreciated.

Thanks Prathap.

A: 

Have a look at "System Colors" section in UIColor class reference. There're class method to get some preset color values, +lightTextColor and +darkTextColor are likely the ones you are looking for.

Vladimir
May be I'm not properly conveyed my message to you? I'm just looking about the colors of "mobile" or "IPhone" or "Home" labels in a contact's info view.
prathumca
A: 

It's very simple, I need to create a UITableViewCell with with style "UITableViewCellStyleValue2". That's it. Very simple solution.

prathumca
+1  A: 

The standard system colors used by Apple are not documented and you have to figure them out yourself (sadly). However, you find a good list here. In your case I guess it's tableCellBlueTextColor. You even can include an extra header with these definitions, but I wouldn't do that for apps submitted to the App Store since it's private framework. You could define it as follows:

#define TABLE_CELL_BLUE_TEXT_COLOR [UIColor colorWithRed:0.22 green:0.33 blue:0.53 alpha:1.0];

And then use it in your code:

label.textColor = TABLE_CELL_BLUE_TEXT_COLOR

Hope it helps. Raphael

Raphael Schaad
It is /not/ a Private Framework -- its undocumented methods on a (very) public one!
chpwn
Thanks for pointing that out. However, the way(s) I described are still valid, good to go and helped me.
Raphael Schaad