0
我有自定义的UITableView和UIImageView,UILabel。在某些通知上,我只需要更新UILabel而不是UIImageView。如果我这样做:UITableViewCell自定义,更新UILabel
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:idxCell inSection:0]] withRowAnimation:UITableViewRowAnimationFade];
单元格的所有内容都在更新,我对UIImageView有闪烁效果。 我做这样的:
MyTableViewCell *cell = (MyTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:idx inSection:0]];
cell.counterLabel.text = [NSString stringWithFormat:@"%@", counter];
但我认为,这是不好的,因为它是不对应于MVC模式。我想我应该更新我的模型对象。我需要建议,我该如何做到这一点?