Skip to content

Conversation

@Sulinskii
Copy link

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

@rslowinski
Copy link

I find it really helpful, thanks!

@KirillKudaev
Copy link

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

@KirillKudaev
Copy link

KirillKudaev commented Nov 14, 2019

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
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants