私が取り組んでいる単純な iOS アプリ プロジェクトがあります。テーブルビューには、Web サービス (RSS フィード) から取得されたエントリが表示され、そのうちの 1 つをタップすると Web ビューに移動します。
以下を使用して、項目が読み取られたかどうかを確認しています。はいの場合は、setAccessoryType を使用してチェック マークを付け、項目が読み取られたことを示します。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
ItemFeed *entry = [[channel items] objectAtIndex:[indexPath row]];
[[MyFeedStore sharedStore] markItemAsRead:entry];
[[[self tableView] cellForRowAtIndexPath:indexPath] setAccessoryType:UITableViewCellAccessoryCheckmark];
}
上記のコードの結果は次のようになります。
私が望むのは、セルが読み取られたことを示すためにセルをぼかすことです。私が欲しいものの例として、TechCrunch iPhoneアプリから次の画像を入れています:
前もって感謝します。
更新: didSelectRowAtIndexPath でテキストの色を変更しようとしましたが、うまくいきませんでした:
ItemsViewCell *cell = (ItemsViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ItemsCell"];
cell.titleLabel.textColor = [UIColor redColor]; //Red color is just for checking right now