Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track Scroll Left or Right #2415

Closed
abrez opened this issue May 6, 2017 · 1 comment
Closed

Track Scroll Left or Right #2415

abrez opened this issue May 6, 2017 · 1 comment

Comments

@abrez
Copy link

abrez commented May 6, 2017

screen shot 2017-05-06 at 12 50 55 pm

Is there anyway to track Left to right or right to left scroll within LineChartView

@akeskiner
Copy link

In your gesture handler method, you can check the sign of the velocity:

    func handleGesture(recognizer: UIPanGestureRecognizer) {
        var velocity : CGPoint = recognizer.velocity(in: self.view)
        if velocity.x > 0 {
            print("Gesture went right")
        } else {
            print("Gesture went left")
        }
    }

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

No branches or pull requests

3 participants