EGOTableViewPullRefresh
EGOTableViewPullRefresh copied to clipboard
Bug when datasource is not available
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.
I am also experiencing this issue.
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