开发者

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:

iPhone: How to change font color in UITableViewCell when selected?


override the method -(void)setselected:(Bool)flag method. change the font

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜