[Feature Request] Disable animations globally #1918
Replies: 6 comments 5 replies
-
@xavierLowmiller how do you disable the animations while you take the snapshots? |
Beta Was this translation helpful? Give feedback.
-
Just set |
Beta Was this translation helpful? Give feedback.
-
@xavierLowmiller ah ok! Do you know how to display only the final frame so that the test don’t have to wait for the animation to finish ? |
Beta Was this translation helpful? Give feedback.
-
Oh sorry, you mean how we disable the Lottie animations? I can't take a look how we exactly did it because I've switched jobs and don't have access to the code base. As far as I remember, we just called |
Beta Was this translation helpful? Give feedback.
-
Was there any reason this wasn't taken up? Looks like Lottie Android has incorporated similar behaviour. Would be super useful for many people I am sure! |
Beta Was this translation helpful? Give feedback.
-
We added support for reduced motion in #2110 |
Beta Was this translation helpful? Give feedback.
-
Description
In our app, we do a lot of snapshot testing.
To keep these deterministic, we disable the Lottie animations by hand, which works 👍.
It would be much easier, though, if Lottie looked at
UIView.areAnimationsEnabled
so that animations could be enabled or disabled globally.If you're interested, I can try and submit a pull request.
Check these before submitting:
This issue is a:
Which Version of Lottie are you using?
Lottie 3.0
What Platform are you on?
What Language are you in?
Beta Was this translation helpful? Give feedback.
All reactions