lottie-ios icon indicating copy to clipboard operation
lottie-ios copied to clipboard

UIAccessibility.isReduceMotionEnabled aware

Open HHuckebein opened this issue 3 years ago • 0 comments

Check these before submitting:

  • [x] The issue doesn't involve an Unsupported Feature
  • [x] This issue isn't related to another open issue

This issue is a:

  • [] Non-Crashing Bug (Visual or otherwise)
  • [] Crashing Bug
  • [x] Feature Request
  • [] Regression (Something that once worked, but doesn't work anymore)

Which Version of Lottie are you using?

Lottie 3.0

What Platform are you on?

  • [] MacOS
  • [x] iOS

What Language are you in?

  • [x] Swift
  • [] Objective-C

Expected Behavior

Lottie is respecting current UIAccessibility.isReduceMotionEnabled User setting out of the box. It would be nice to have Lottie takes UIAccessibility settings into account or at least have some opt-in behavior for the various play methods.

Actual Behavior

animation.play is always showing the animation.

Code Example

I'm currently writing code like this if UIAccessibility.isReduceMotionEnabled { animationView.currentProgress = 1 } else { animationView.play() }

HHuckebein avatar Aug 10 '21 09:08 HHuckebein