私が持っているテーブルビューは、セルの背景色を頻繁に変更します。設定された-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
色は問題ありませんが、いくつかの色は、テーブル ビューが読み込まれた後に次のように設定されます。
- (void) ChangeCellColorAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:currentCell inSection:0]];
cell.backgroundView.backgroundColor = [UIColor orangeColor];
}
そのメソッドでセルが変更された場合、スクロールして表示されなくなると、元の設定に戻ります。ビューからスクロールしても同じ色を維持するにはどうすればよいですか。