AnimationKeypath("Progress.Time Remap") ValueProvider works with .mainThread but not with .automatic #2641
Replies: 3 comments 1 reply
-
|
@calda can you help here? |
Beta Was this translation helpful? Give feedback.
-
|
Time remapping is not customizable via value providers in the Core Animation rendering engine. Would be reasonable to add. PRs welcome! If you're just trying to set the speed to 2x, you can more simply set the |
Beta Was this translation helpful? Give feedback.
-
|
Since you're looking to dynamically control a progress bar animation based on user behavior, here are the recommended Option 1: Direct Progress Control (Recommended for Progress Bars) Instead of time remapping, control the animation's progress directly: SwiftUI: } UIKit: // Or animate to a progress value Option 2: Frame-Based Control If your animation has specific frames for progress states: // Play from frame 0 to frame 30 (out of 60 total) Option 3: Marker-Based Control If you've set up markers in your Lottie file (After Effects): // Play between named markers For Your Use Case Since you want to dynamically increase/decrease based on user behavior: struct DynamicProgressBar: View { } This approach works with .automatic (Core Animation) engine, requires no time remap, and gives you direct control over Key insight: Treat the animation timeline as your progress scale (0.0 = empty, 1.0 = full) rather than trying to control |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am seeing different behavior for a ValueProvider based on the rendering engine.
What I am trying to do
Apply a FloatValueProvider to the keypath "Progress.Time Remap" to affect the animation timing.
Keypath: "Progress.Time Remap"
Provider: FloatValueProvider(CGFloat(2))
SwiftUI
.valueProvider( FloatValueProvider(CGFloat(2)), for: AnimationKeypath(keypath: "Progress.Time Remap"))Expected behavior
The time remap should update (animation timing changes as expected).
Actual behavior
When LottieConfiguration.shared.renderingEngine = .mainThread, it works.
When LottieConfiguration.shared.renderingEngine = .automatic, it does not work (the value provider appears ignored / no visible effect, lottie plays till end).
Configuration
LottieConfiguration.shared.renderingEngine = .automatic
LottieConfiguration.shared.decodingStrategy = .dictionaryBased
Questions
Is "Progress.Time Remap" supported with the .automatic engine and/or dictionaryBased decoding?
If not, is there an alternative supported approach for time remap in automatic mode?
If it should work, is this a known bug/regression?
Environment
Lottie iOS version: 4.5.2
iOS version(s): iOS 26
Device(s): iPhone 17
Animation format: dotLottie
Beta Was this translation helpful? Give feedback.
All reactions