views:

41

answers:

2

Hello ,

Apparently this is deprecated :

cell.textColor = [UIColor whiteColor];

Does anyone know what the best way to change the color of a Cell Text ?


Edit after comment :

I'm now using this :

cell.textLabel.textColor = [UIColor whiteColor];

but the color is still not changing, see the IB parameters :

alt text

+2  A: 

cell.textLabel.textColor = [UIColor whiteColor];

NR4TR
Not erroring out anymore thanks, but the text color is still not changing for some reason .. ( see the edit )
Julz
+1  A: 

Like says Apple on the UITableViewCell page http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html

The color of the title text. (Deprecated in iOS 3.0. Instead set the text color attribute of the UILabel objects assigned to the textLabel and detailTextLabel properties.)

You must use the textLabel instead textColor ;-)

Edit : you must add your OWN textLabel. You must forget cell.text

Vinzius