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

Touch gestures not working on iOS #1684

Closed
albyrock87 opened this issue Oct 31, 2024 · 3 comments · Fixed by #1704
Closed

Touch gestures not working on iOS #1684

albyrock87 opened this issue Oct 31, 2024 · 3 comments · Fixed by #1704
Labels
bug Something isn't working
Milestone

Comments

@albyrock87
Copy link
Contributor

Describe the bug
Create an MAUI app, install the package 2.0.0-rc4.5, include the CartesianChart basic example in the main page.
Start the app on iOS (simulator or device).
See that touch gestures are not working (i.e. tooltip not showing / zoom not working).

Expected behavior
Tooltip should show

Smartphone (please complete the following information):

  • Device: Simulator or iPhone 13
  • OS: iOS
  • Version: 17.5

Additional context

To solve the problem I've added this at the top of MauiProgram builder method:

_ = typeof(LiveChartsCore.Behaviours.ChartBehaviour).GetProperties();

Why? Because from the debugger I saw that entering with F11 into contentView.AddGestureRecognizer(GetMacCatalystLongPress(contentView)); was only hitting AddGestureRecognizer and not GetMacCatalystLongPress which oddly was the only unrecognized symbol by the debugger.

So I thought...

Maybe the symbol was somehow messed up by the linker

And that's why I've tried (succesfully) this trick.

Please note that if I check out LiveCharts2 repo and try out the sample app, everything works.
Also, if I reference the source project from my app (instead of the NuGet package) everything works.

So maybe it's a packaging issue.. I don't really now.

One other interesting thing, from Rider pressing GoToDefinition on ChartBehaviour only suggests .NET Standard and Android version while iOS does not show up.

I hope this helps :)

Thanks for this awesome library!

@albyrock87
Copy link
Contributor Author

Despite what I've thought.. it's still not working in sub-pages inside Shell.
Honestly idk why.

@albyrock87
Copy link
Contributor Author

image
Methods appear to be there.

But gesture recognizes are not.
image

@beto-rodriguez beto-rodriguez added the bug Something isn't working label Dec 27, 2024
@beto-rodriguez beto-rodriguez added this to the rc-5 milestone Dec 27, 2024
@beto-rodriguez
Copy link
Owner

This is now published, and working on 2.0.0-rc5.1, thanks again for the PR @albyrock87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants