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

touchesEnded event in BarChartView not called #613

Closed
niklas22 opened this issue Dec 15, 2015 · 8 comments
Closed

touchesEnded event in BarChartView not called #613

niklas22 opened this issue Dec 15, 2015 · 8 comments

Comments

@niklas22
Copy link

Hello everyone!

I'm currently developing an iOS App which is using the Charts-framework.
I want to know when the user stops zooming or touching the chart.
But when i call the touchesBegin/Moved/Ended events, the touchesEnded event is not called.

I hope someone can help me with this issue! :-)

Kind regards

Niklas

@liuxuan30
Copy link
Member

how do you setup your gesture and call touchesBegin/Moved/Ended events?

The library already had some gestures in BarLineChartViewBase and its handlers are like:
@objc private func pinchGestureRecognized(recognizer: UIPinchGestureRecognizer)
You can provide your own implementation, or add delegate method and call it when the gesture state is ended.

@farfromrefug
Copy link

@liuxuan30 i would like to re open that issue cause i can see this clearly happening.
When using a ChartView i can see my views touchesEnded not being called.
I can see touchesBegan but no touchesEnded.
I soon as touch another view it works.

It feels like you are canceling/preventing the touch from being propragated

@liuxuan30
Copy link
Member

Have you checked the origin implementation? Are you providing yours or using the library's?

@farfromrefug
Copy link

what do you mean by origin implementation?
I do set breakpoint in touchesBegan from Charts and i do break there.
Now that i think about it i think i know what's going on. You must have a longpress gesture that cancels touch end events.
I think about this because i do get the touch end events when i long press on the Charts view. Will run some tests

@liuxuan30
Copy link
Member

liuxuan30 commented Dec 13, 2016

What I mean is gesture handlers are private funcs, so if you use yours, it should be calling yours only.. If you change the library's implementation, then I am not aware of.
The library seems not having a long press gesture. You can take a look at BarLineChartViewBase, it holds all the gesture handlers.

@dtroupe18
Copy link

For anyone stumbling along this issue take at look at this StackOverflow Question.

@farfromrefug
Copy link

@dtroupe18 can you make a PR?

@dtroupe18
Copy link

@farfromrefug I did. #3599 There is also this PR #3612

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

4 participants