Baseflow / LottieXamarin

Render After Effects animations natively on Android, iOS, MacOS and TvOS for Xamarin
https://baseflow.com
Apache License 2.0
1.22k stars 261 forks source link

iOS max/min frame and max/min progress ignored #322

Open MattRames opened 3 years ago

MattRames commented 3 years ago

🐛 Bug Report

Max/min frame and max/min progress are ignored/commented out in the animation view renderer. Are these disabled on purpose?

https://github.com/Baseflow/LottieXamarin/blob/develop/Lottie.Forms/Platforms/Ios/AnimationViewRenderer.cs

Expected behavior

I would expect when I set max/min frame or max/min progress it would work.

Reproduction steps

Set max/min frame or max/min progress the full animation still plays.

Version: 4.0.7

Platform:

WilCantrellAtDs commented 3 years ago

Confirmed. Using this library for the first time, I discovered this as well. I haven't found a work around and considering just swapping out the JSON source for the 3 states I require.

Version: 4.0.8, iOS/Xamarin.Forms

WilCantrellAtDs commented 3 years ago

Follow up, I found a way around this:

In the XAML markup, make sure that AutoPlay is False. And when changing the frame range, make sure to call StopAnimation() on the AnimationView before starting PlayMinAndMaxFreame().