iOS表格视图刷新单元格 [英] iOS Table View Refresh Cell
本文介绍了iOS表格视图刷新单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我按照以下链接中的建议将图像添加到表格视图中的单元格。
I followed the advice in the link below to add images to cells in a table view.
有没有办法强制刷新一个单元格,即添加/删除图像或指标?
Is there a way to force refresh a cell i.e. add/remove images or indicators?
推荐答案
您可以调用 [self.tableview reloadData] ;
在tableview上刷新整个表。
You can call [self.tableview reloadData];
on the tableview and refresh the entire table.
否则你可以刷新一个单元格。
Otherwise you can do this to refresh a single cell.
[self.tableView beginUpdates];
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPathOfYourCell] withRowAnimation:UITableViewRowAnimationNone];
[self.tableView endUpdates];
这篇关于iOS表格视图刷新单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文