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

UISwipeGestureRecognizer for BarChartView #895

Closed
amitvyawahare opened this issue Mar 29, 2016 · 3 comments
Closed

UISwipeGestureRecognizer for BarChartView #895

amitvyawahare opened this issue Mar 29, 2016 · 3 comments

Comments

@amitvyawahare
Copy link

How can I use UISwipeGestureRecognizer on BarChartView? I wrote some code but it didn't work.

override func viewDidLoad() {
    super.viewDidLoad()

    let gestureRight = UISwipeGestureRecognizer(target: self, action: Selector("handleRightSwipe:"))
    gestureRight.direction = .Right
    barChartView.addGestureRecognizer(gestureRight)

}

func handleRightSwipe(sender: UISwipeGestureRecognizer) {
    print("Right Direction")
}

Do I need to disable any gesture from BarChartView to get Right and left swipe ?

@liuxuan30
Copy link
Member

the library has pan gesture, tap gesture, and pinch gesture. I am not sure if any conflict in your app, but you should check if any view captured your touch event or the library handled it

@Bhargavi-Enrich
Copy link

@liuxuan30 I have written the same code and its not working for me too. Can you please tell how to handle swipe gesture in this case on bar chart.

@Bhargavi-Enrich
Copy link

Same code works well on other view but not on BarChartView.

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