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

IOS Animation happening too soon #389

Open
1 task done
sisaacks opened this issue Jan 30, 2023 · 3 comments
Open
1 task done

IOS Animation happening too soon #389

sisaacks opened this issue Jan 30, 2023 · 3 comments

Comments

@sisaacks
Copy link

sisaacks commented Jan 30, 2023

馃悰 Bug Report

Expected behavior

When using an IOS device, if I have set the RepeatCount to something greater than "1" I would expect the animation to repeat that many times. Right now, now matter what number you set RepeatCount to, the animation will only repeat once.

I tried setting RepeatMode to "Restart". There was no change.

I tried setting Repeat mode to "Infinite" resulted into the animation playing over and over as expected, however I only want the animation to play a certain number of times.

Android works as it should.

UPDATE 2/1/2023
I found by adding some logging that on iOS that animation is happening multiple times prior to the screen loading completing.
For example I set the repeat count to 3. I added some logging in OnFinishedAnimation. This method ran twice before the screen was loaded so it appeared the animation only ran 1 time.

Reproduction steps

Set the RepeatCount to something greater than 1. In the method OnFinishedAnimation add some logging so that you can see that the animation is taking place even though the screen has not finished loading

Configuration

<lottie:AnimationView
Grid.Column="0" Grid.Row="0"
Animation="MyFile.json"
AutoPlay="True"
RepeatCount="3"
IsVisible="True"
WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Start"
VerticalOptions="Start" />
Lottie Version: 4.0.11
Xamarin Forms: 5.0.0.2545
using iPhone 12 actual device

Platform:

  • 馃摫 iOS
@sisaacks sisaacks changed the title IOS RepeatCount not working IOS Animation happening too soon Feb 1, 2023
@AbdChahid
Copy link

@sisaacks in my case I can't even get it to show. The OnFinishedAnimation works as it should but nothing is shown on iOS.
On Android everything is fine.
Do you have any ideas how I can get it to display, or the things to check that can make a difference please ?

@sisaacks
Copy link
Author

sisaacks commented Mar 2, 2023

@AbdChahid Where are you lottie files for iOS located?

@sisaacks
Copy link
Author

I never did find out why its only playing once ion iOS. Is anyone looking into this? Other than the animation seems to happen too soon

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