How to change color of cell.textLabel.text (cell is a UITableViewCell) after click action
I have a bunch of articles shown as cells. When a user clicks on an article, reads it and goes bac开发者_Go百科k, I want that cell.textlabel.text to change from a dark blue to even a darker blue to indicate that article has been read. How do I do that?
Example:
if (/* article associated with cell has been read*/) {
cell.textLabel.textColor = [UIColor colorWithRed:0 green:0 blue:0.8 alpha:1]
}
else {
cell.textLabel.textColor = [UIColor colorWithRed:0 green:0 blue:0.6 alpha:1]
}
精彩评论