开发者

How to change the cell title color when selected in UITableView

HI, I am using a UITableView to display listings. I have customized it and have added 4 UILabels in the cell, but when the row is selected then the row s开发者_开发技巧election color (customized to green) and Label text color (also a green) remains same. So, it becomes difficult to see the text of cell. I want to change the color of labels to white when row is selected otherwise green.

Can anyone help me out?

Thanks,


Look at the highlightedTextColor property on the labels. Set that to white and it should do what you want.


If you’re subclassing UITableViewCell, there’s always the -setSelected:animated: method to override.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜