-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for prepending items on pull to refresh #70
Comments
I would need a demo project that demonstrates this issue so I can see what might be the problem. Have you tried disabling animations within SVPullToRefresh on the stopAnimating method see if that fixes it? Also, is there any reasons why you're not using UITableView's insertRows method instead of calling reloadData? |
@samvermette It is not that I am going to argue about reloadData is better than table view's insert mechanism, but usually it is way easier to update the data source and then simply reloadData instead updating the view manually. (I have no idea about @anqqa's specific issue though) |
Haven't tried to disable animations from stopAnimating, will try that next, thanks. And the reason for realoadData vs insertRows is just my lack of competence as this was my first iPhone app, so still going with anything I can manage to get to work reasonably well :D |
I'm using SVPullToRefresh in my calendar application to load previous events when scrolling upwards and infinite scroll to load next events.
With previous version I managed to make it work so that after reloading the TableView with new data prepended I scrolled to the previously first item and called stopAnimating and it worked like a charm, the last of the now prepended items replaced the loader and I could continue scrolling upwards.
With current version if I do the same it always scrolls to the first item in the table. Changing the execution order to stopAnimating before TableView's reloadData and scroll there's short flickering as the table scrolls to empty first item, reloads and then back to the previously first item.
Any ideas how to make it smooth again? Diff for the change between old and new SVPullToRefresh at anqqa/klubitus-ios@680f5d0
The text was updated successfully, but these errors were encountered: