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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

The AnimationView.Clicked event handler is not working on iOS #280

Closed
1 of 7 tasks
jBijsterboschNL opened this issue Sep 10, 2020 · 4 comments
Closed
1 of 7 tasks

Comments

@jBijsterboschNL
Copy link

jBijsterboschNL commented Sep 10, 2020

馃悰 Bug Report

The AnimationView.Clicked event handler is not working on iOS. I've tested this on Android and it works fine on Android.

Expected behavior

When setting the Clicked event on an AnimationView, the Clicked event should be triggered when the user clicks on the animation.

Reproduction steps

  1. Create new Xamarin.Forms project and install Com.Airbnb.Xamarin.Forms.Lottie NuGet packages to all project
  2. Add AnimationView to MainPage
  3. Set Clicked event handler
  4. Set debug breakpoint inside the on clicked method
  5. Run app and click on the specific animation

Configuration

Version: 4.0.0-alpha3

Platform:

  • 馃摫 iOS
  • 馃 Android
  • 馃弫 WPF
  • 馃寧 UWP
  • 馃崕 MacOS
  • 馃摵 tvOS
  • 馃悞 Xamarin.Forms
@jBijsterboschNL jBijsterboschNL changed the title The Clicked event handler is not working on iOS The AnimationView.Clicked event handler is not working on iOS Sep 10, 2020
@martijn00
Copy link
Member

It is added here: https://github.com/Baseflow/LottieXamarin/blob/develop/Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs#L123

Can you see a reason why it is not working?

@jBijsterboschNL
Copy link
Author

@martijn00, not sure what is causing this. Otherwise I would have given you more details on this issue. Perhaps this Xamarin.Forms issue: xamarin/Xamarin.Forms#10623 ? Anyway, I've managed to work around this issue by adding a Xamarin.Forms.TemplateView with a TapGestureRecognizer on top of the AnimationView. Not very proud of this work around, but for now I can continue with this. But maybe we should keep this issue open to find the exact problem and fix this!

@martijn00
Copy link
Member

I've fixed it. Can you test the new release that will be out soon?

@jBijsterboschNL
Copy link
Author

@martijn00, I've tested this bug fix with the new released version v4.0.0-alpha4 and can confirm that it works now :) thanks for your quick response and fix on this! Cheers

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

2 participants