reloadData only on tableView visible cells

前端 未结 3 1823
无人共我
无人共我 2020-12-15 19:53

Is that possible? To reload only the cells that are visible in order to do it more efficient.

3条回答
  •  失恋的感觉
    2020-12-15 20:31

    Try this, You can reload any cell of the tableview using reloadRowsAtIndexPaths:

    [self.tableView beginUpdates];
    [self.tableView reloadRowsAtIndexPaths:[self.tableView indexPathsForVisibleRows]
                     withRowAnimation:UITableViewRowAnimationNone];
    [self.tableView endUpdates];
    

提交回复
热议问题