SVPullToRefresh icon indicating copy to clipboard operation
SVPullToRefresh copied to clipboard

fix cash on Observing

Open captain-black opened this issue 10 years ago • 2 comments

    if (self.infiniteScrollingView.isObserving) {
        [self removeObserver:self.infiniteScrollingView forKeyPath:@"contentOffset"];
        [self removeObserver:self.infiniteScrollingView forKeyPath:@"contentSize"];
        [self.infiniteScrollingView resetScrollViewContentInset];
        self.infiniteScrollingView.isObserving = NO;
    }

[self.infiniteScrollingView resetScrollViewContentInset]; will make scrolling and trigger this method again.

you should do: if (self.infiniteScrollingView.isObserving) { self.infiniteScrollingView.isObserving = NO; [self removeObserver:self.infiniteScrollingView forKeyPath:@"contentOffset"]; [self removeObserver:self.infiniteScrollingView forKeyPath:@"contentSize"]; [self.infiniteScrollingView resetScrollViewContentInset]; }

This kind of BUG is also in the other method, fix them like above

captain-black avatar Jun 06 '15 03:06 captain-black

you are welcome to pull a request. This project has stopped updating for a long time. You can fix it in your branch.

liuxuan30 avatar Jun 08 '15 01:06 liuxuan30

https://github.com/LawrenceHan/SVPullToRefresh

LawrenceHan avatar Nov 22 '16 09:11 LawrenceHan