When I call for self.refreshControl.endRefreshing()
it snaps the tableView back to it original spot like it should. How should I go about animating it so that it fluently returns to its original spot on endRefreshing()
?
Try this
[CATransaction begin];
[CATransaction setCompletionBlock:^{
// reload tableView after refresh control finish refresh animation
[self.tableView reloadData];
}];
[self.refreshControl endRefreshing];
[CATransaction commit];
To anyone having this issue, you must call your endRefreshing
method before you reload the table data. Otherwise when the table updates it will override the refresher and cause it to look buggy.
I was having this issue and tried every suggestion above (and others from similar threads).
What the problem turned out to be in my case was... I hadn't enabled refreshing in interface builder. I only added the code to create a refresh control and listen for the value changed event. It worked, but was "jumpy" as others have described.
Enabling it in interface builder fixed my problem. If you've tried everything else, check your storyboard!
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