开发者

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]
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜