Closed iOkay closed 11 years ago
The realize of function as fellow:
(void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView {
if (_state == EGOOPullRefreshLoading) {
CGFloat offset = MAX(scrollView.contentOffset.y * -1, 0); offset = MIN(offset, 60); scrollView.contentInset = UIEdgeInsetsMake(offset, 0.0f, 0.0f, 0.0f);
} else if (scrollView.isDragging) {
BOOL _loading = NO; if ([_delegate respondsToSelector:@selector(egoRefreshTableHeaderDataSourceIsLoading:)]) { _loading = [_delegate egoRefreshTableHeaderDataSourceIsLoading:self]; } if (_state == EGOOPullRefreshPulling && scrollView.contentOffset.y > -65.0f && scrollView.contentOffset.y < 0.0f && !_loading) { [self setState:EGOOPullRefreshNormal]; } else if (_state == EGOOPullRefreshNormal && scrollView.contentOffset.y < -65.0f && !_loading) { [self setState:EGOOPullRefreshPulling]; } if (scrollView.contentInset.top != 0) { scrollView.contentInset = UIEdgeInsetsZero; }
}
if I am not add the condition of "scrollView.isDragging", like that
} else {
} what is the matter with it? What the potential bug will be?
The realize of function as fellow:
(void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView {
if (_state == EGOOPullRefreshLoading) {
} else if (scrollView.isDragging) {
}
}
if I am not add the condition of "scrollView.isDragging", like that
(void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView {
if (_state == EGOOPullRefreshLoading) {
} else {
}
} what is the matter with it? What the potential bug will be?