2011-02-04 24 views
0

後更改cell.textLabel.text(細胞是一個UITableViewCell)的顏色我有一堆顯示爲細胞的文章。當用戶點擊一篇文章,讀出它並且回到過去,我想那cell.textlabel.text從深藍色變爲甚至深藍色,表示該文章已被閱讀。 我該怎麼做?如何點擊動作

回答

3

實施例:

我m具有瓦特/
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

它不是顏色。其與單元格關聯的/ *文章已被讀取* /部分。順便說一句I M改變顏色 - (UITableViewCell中*)的tableView:(UITableView的*)的tableView的cellForRowAtIndexPath:(NSIndexPath *)indexPath { – 2011-02-10 21:50:08