In scrollViewDidScroll, I check if the table view is scroll close enough to the bottom, if it is, a network request is executed to fetch new data from the server, and when the network request is successful I updated the data model and then updated the tableView by calling [tableView reloadData].
The symptom is the scrolling performance is choppy at the moment when the network request is finished and new items get added to the table.
Does anyone know what could cause the issue?
don't reload the whole table view
just add your data to dataSource and call [tableView:insertRowsAtIndexPaths:withRowAnimation]
Example ..
// addNewDataToDataSource(data)
[tableView beginUpdates];
[tableView insertRowsAtIndexPaths:indexes withRowAnimation:UITableViewRowAnimationAutomatic];
[tableView 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