i want to implement the feature PullDownToRefresh like Twitter app. I’m using EGORefreshTableHeaderView and PullToRefreshTableView classes, but i’ve an error in this point in PullToRefreshTableView.m class :
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
if (scrollView.isDragging) {
/*here is the error/* if (refreshHeaderView.state == EGOOPullRefreshPulling && scrollView.contentOffset.y > -65.0f && scrollView.contentOffset.y < 0.0f && !_reloading) {
[refreshHeaderView setState:EGOOPullRefreshNormal];
} else if (refreshHeaderView.state == EGOOPullRefreshNormal && scrollView.contentOffset.y < -65.0f && !_reloading) {
[refreshHeaderView setState:EGOOPullRefreshPulling];
}
}
}
Try out this cool plugin from Leah. It’s called PullToRefresh and is hosted on GitHub.