reloadData仅在tableView可见单元格上
问题描述:
这可能吗?仅重新加载可见的单元格以便更有效。
Is that possible? To reload only the cells that are visible in order to do it more efficient.
答
这是默认情况下表视图的工作方式。 UITableView
类永远不会加载单元格,直到它们即将出现在屏幕上,即使你调用 reloadData
。
That's how table views work by default. The UITableView
class never loads cells until they're about to appear onscreen, even when you call reloadData
.