2
votes

I am dealing with a web service that uses paging. I am using UITableView to display results. The idea is once the user scrolls to somewhere around the bottom of the table, a call is made to get new data. Once received the data is inserted into table view, with normal, [tableView beginUpdates] , [tableView inserItemsAtIndexPahts..] and [tableView endUpdates]. The issue, is if the table view is decelerating, and the cells are inserted at the same time, the deceleration animation will stop immediately making the table view seem 'weird'.

Any way around this problem ?

1
The issue is not that it scrolls on insert but rather that it stops decelerating.foFox

1 Answers

0
votes

Try to update your table view when it stopped decelerating by implementing scrollViewDidEndDecelerating: method. And do not insert into table view anything when it's decelerating.

if (tableView.decelerating == NO) {
    // Insert.
}