pronebird / UIScrollView-InfiniteScroll

UIScrollView ∞ scroll category
MIT License
1.06k stars 148 forks source link

Fixed bug when there was weird animation which shifts offset #56

Closed rr-dw closed 7 years ago

rr-dw commented 7 years ago

Fixed bug when there was weird animation which shifts offset (if there was specified different offset then default one). This shifting occurred when user panned scroll/collectionview during "finishInfiniteScroll" or when he partially hid the progress bar before the "finishInfiniteScroll" was called.

pronebird commented 7 years ago

Hi,

That looks like a legit fix. I wonder what "progress bar" are you talking about though?

Cheers, Andrej

rr-dw commented 7 years ago

"progress bar" == circular progress indicator

When I invoked infinite scroll indicator on bottom and then slightly pushed it back down, it also shifted offset(in some weird animation)

pronebird commented 7 years ago

@rr-dw Oh I see now. I fixed the other spot where it used to reset horizontal offset:

https://github.com/pronebird/UIScrollView-InfiniteScroll/commit/7c93cb85838c5329f6b4698b15244e4f16d5e2a0

Please pull the latest master to verify that everything works as expected. I don't think we change offset anywhere else.

Thanks for raising this issue!

rr-dw commented 7 years ago

Glad I could help.

// Scroll to top if scroll view had no content before update state.scrollToTopWhenFinished = ![self pb_hasContent];

I had always a content so pb_scrollToTop was not triggered for me, but I tried it for you with no content(both: your fix and without) and I can confirm that there was also offset bug and that your fix is working correctly.

pronebird commented 7 years ago

This fix has been released as a part of 1.0.1.