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

Lottie Animation on ios Happening before screen is rendered #1942

Closed
sisaacks opened this issue Feb 1, 2023 · 6 comments
Closed

Lottie Animation on ios Happening before screen is rendered #1942

sisaacks opened this issue Feb 1, 2023 · 6 comments

Comments

@sisaacks
Copy link

sisaacks commented Feb 1, 2023

I have an Xamarin Flyout Application. I am having an issue with animation on iOS. It works however it seems to be animating before the screen finishes loading with iOS. For example, I set the repeat count to 3, on Android I will see the animation repeat 3 times. Where on iOS I only see it once. So I added some logic and found that the file was animating twice before the screen finished.

Which Version of Lottie are you using?

Lottie 4.0.11

Expected Behavior

I have the repeat count set to 3 on my lottie animation. It works perfectly on Android. However it appears to only happen once on iOS. However after adding some logging and checking....the lottie animation on iOS is happening prior to the screen rendering. So it actually has two animation cycles before the screen is shown.

Actual Behavior

I would expect iOS to behave the same as Android and start animation after the screen is rendered.

Animation JSON

{"v":"5.6.6","ip":0,"op":80,"fr":60,"w":612,"h":792,"layers":[{"ind":2911,"nm":"surface44761","ao":0,"ip":0,"op":80,"st":0,"ty":4,"ks":{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"a":0,"k":[0,0,0],"ix":2},"a":{"k":[0,0]},"s":{"k":[133.33,133.33]},"sk":{"k":0},"sa":{"k":0}},"shapes":[{"ty":"gr","hd":false,"nm":"surface44761","it":[{"ty":"gr","hd":false,"it":[{"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[352.11,236.59],[388.08,180.22],[220.11,180.23],[220.11,277.19],[159.91,180.23],[103.39,180.23],[103.39,367.05],[159.73,367.05],[159.73,287.53],[237.05,414.41],[276.45,353.23],[276.45,305.82],[307.71,305.82],[342.27,249.57],[276.45,249.57],[276.45,236.59]],"c":true}}},{"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[326.18,258.57],[302.69,296.82],[267.45,296.82],[267.45,350.58],[237.26,397.46],[150.73,255.46],[150.73,358.05],[112.39,358.05],[112.39,189.23],[154.91,189.23],[229.11,308.75],[229.12,189.23],[371.66,189.23],[347.18,227.6],[267.45,227.59],[267.45,258.57]],"c":true}}},{"ty":"fl","o":{"k":100},"c":{"k":[0,0,0,1]}},{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"k":[0,0]},"a":{"k":[0,0]},"s":{"k":[100,100]},"sk":{"k":0},"sa":{"k":0},"hd":false}]},{"ty":"tr","o":{"k":100},"r":{"k":0},"p":{"k":[0,0]},"a":{"k":[0,0]},"s":{"k":[100,100]},"sk":{"k":0},"sa":{"k":0},"hd":false}]},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.35],"y":[1]},"o":{"x":[0.17],"y":[0.17]},"t":0,"s":[25]},{"t":55,"s":[100]}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}]}],"meta":{"g":"LF SVG to Lottie"}}

@calda
Copy link
Member

calda commented Feb 1, 2023

Could you share a UIKit or SwiftUI sample project that reproduces this issue?

If this is an issue with Xamarin Flyout I suggest filing an issue with that team / project, or with the package that provides the Lottie support that you're using for that platform.

@sisaacks
Copy link
Author

sisaacks commented Feb 1, 2023 via email

@calda
Copy link
Member

calda commented Feb 1, 2023

Great, I'll close this issue in favor of Baseflow/LottieXamarin#389. That looks like the right repo for this issue to me.

@calda calda closed this as completed Feb 1, 2023
@sisaacks
Copy link
Author

sisaacks commented Feb 1, 2023 via email

@sisaacks
Copy link
Author

sisaacks commented Feb 1, 2023 via email

@sisaacks
Copy link
Author

sisaacks commented Apr 18, 2023

@calda on iOS for some reason the animation only plays once even though I have repeat set to 3 it only plays once. On Android it plays three times

@calda can you reopen this please? I am still facing this issue. I am not sure thats its an "Xamarin" issue because it works fine on Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants