views:

49

answers:

2

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 selection 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,

A: 

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

Joshua Weinberg
A: 

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

Jeff Kelley