soffes / SSPullToRefresh

Simple and highly customizable pull to refresh view
MIT License
885 stars 139 forks source link

If tableview has more cells than fit on the screen, then startLoadingAndExpand is glitchy #20

Closed squarefrog closed 11 years ago

squarefrog commented 11 years ago

There's an issue with [self.pullToRefreshView startLoadingAndExpand:YES]; method, in that if you have more cells than fit on the screen, when this method is called the header animates down, but the pull to refresh view stays put.

If you manually pull down then the animation sorts itself out.

hwaxxer commented 11 years ago

Squarefrog, are you still seeing this issue? I believe it was fixed in https://github.com/soffes/sspulltorefresh/commit/56172e46e5f98452f06f417ba04019288d09425d.

density commented 11 years ago

I believe I'm seeing this issue when finishLoading is called quickly after startLoading. I'm not sure why yet, but changing line 242 of SSPullToRefreshView.m to

[_scrollView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:NO]; 

fixes it. This line was added in 56172e4 with the animation enabled. I suspect it's something to do with the scroll animation being called within the animation block initiated in _setState:(SSPullToRefreshViewState)state animated:(BOOL)animated expanded:(BOOL)expanded completion:(void (^)(void))completion