EGOTableViewPullRefresh icon indicating copy to clipboard operation
EGOTableViewPullRefresh copied to clipboard

Bug when datasource is not available

Open stsandro opened this issue 13 years ago • 2 comments

Hello,

when I replace [self performSelector:@selector(doneLoadingTableViewData) withObject:nil afterDelay:3.0]; with [self performSelector:@selector(doneLoadingTableViewData)]; in

  • (void)egoRefreshTableHeaderDidTriggerRefresh:(EGORefreshTableHeaderView*)view

the view stays always in loading mode. This can happen for instance if you load something from the web and the device has no connection and therefore there's nothing to reload.

stsandro avatar Jul 13 '11 12:07 stsandro

I am also experiencing this issue.

henryeverett avatar Sep 20 '11 08:09 henryeverett

I have forked the repo and fixed this bug as far as I can tell. The problem stems from the return of data (or no data) happing quicker than it takes for the pulldown animation to finish. I have fixed this by adding an animation delegate which checks again if the data is finished loading once the animation is finished. See the demo files for an example of how to implement this in your tableView class.

https://github.com/henrysoup/EGOTableViewPullRefresh

henryeverett avatar Sep 21 '11 15:09 henryeverett