Closed om-ha closed 5 years ago
All items (except first and last one) had incorrect offset when scrolling because isPagingEnabled
was set to true
from Interface Builder or previously when setting up the collection view (which other developers might miss). This is making the UICollectionView
instance not honor targetContentOffset
in scrollViewWillEndDragging
but rather use a multiplier of UICollectionView
instance bounds width.
Ohh man I'm really sorry you wasted your time trying to figure this out. I added the step to disable paging in the Medium article but haven't added it to the configuration function 😢 Thank you so much for the contribution. I'll merge this PR and create a new release
No problem, in a way it was beneficial trying to pin this one that I understood how your implementation works, and gained more insight about UICollectionView's inner-workings. Many thanks for the great library!
Much appreciated mate! I'm glad it was of good help for you 👍
This fixes
targetContentOffset
bug inscrollViewWillEndDragging
where the offset is a multiplier of the UICollectionView bounds' width ifUICollectionView
paging is enabled.