iPhone: How to change font color in UITableViewCell when selected?
I have a UITableViewCell with labels inside my contentview. Whe开发者_JAVA技巧n I set the cell selection style to gray or blue, I want the font color in the label to be white. How can I do that?
Use
cell.textLabel.highlightedTextColor = [UIColor whiteColor];
This can also be done directly in Interface Builder. Just select the cell's title or subtitle label, flip to the Attributes inspector, and select the color with this control:
override the method -(void)setselected:(Bool)flag
method. change the font
精彩评论