UPCarouselFlowLayout icon indicating copy to clipboard operation
UPCarouselFlowLayout copied to clipboard

Fix issue #37

Open Sulinskii opened this issue 6 years ago • 3 comments

scroll not smooth while scroll small space and release your hand quickly

Sulinskii avatar Oct 31 '18 10:10 Sulinskii

I find it really helpful, thanks!

rslowinski avatar Oct 31 '18 12:10 rslowinski

Thank you! Currently doesn't work on my very first cell for some reason. Works for every other one. Trying to investigate...

KirillKudaev avatar Nov 14 '19 19:11 KirillKudaev

Solves some edge cases:



        let hasScrollingVelocity = isHorizontal ? (velocity.x != 0) : (velocity.y != 0)
let proposedContentOffsetCenterOrigin: CGFloat
if hasScrollingVelocity {
            let velocityDirectionMultiplier: CGFloat = (isHorizontal ? velocity.x : velocity.y) > 0 ? 1 : -1
            proposedContentOffsetCenterOrigin = velocityDirectionMultiplier * 10000
        } else {
            proposedContentOffsetCenterOrigin = (isHorizontal ? proposedContentOffset.x : proposedContentOffset.y) + midSide
        }

KirillKudaev avatar Nov 14 '19 23:11 KirillKudaev