Hello, I am using a custom cell with multiple labels contained in it. I would like to change the text color of all labels to white, when the cell is selected. How would do this?
Appreciate any help.
Hello, I am using a custom cell with multiple labels contained in it. I would like to change the text color of all labels to white, when the cell is selected. How would do this?
Appreciate any help.
In the implementation of the custom cell class overwrite the following method
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:(BOOL)selected animated:(BOOL)animated];
[someLabel setTextColor:[UIColor whiteColor]];
}
either set the highlighted/selected color(code or ib) or do what the above poster suggested except you need to put it inside an if statement since that code sets the text even if the cells get sent a deselected value
eg..