Is that possible? To reload only the cells that are visible in order to do it more efficient.
Reloads the rows and sections of the table view.
When [tableView reloadData] returns, the internal data structures behind the tableView have been updated. Therefore, when the method completes you can safely scroll to the bottom. I verified this in my own app.
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.
To reload visible cells of tableview in Swift 3.0:
guard let visibleRows = pTableView.indexPathsForVisibleRows else { return }
pTableView.beginUpdates()
pTableView.reloadRows(at: visibleRows, with: .none)
pTableView.endUpdates()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With