Let's say a Lottie animation has a total duration of 30 seconds.
How can I start the animation from the 15-second mark as opposed to the beginning mark?
I haven't found any documentation regarding this but I'm curious if anyone has done it yet?
I'm thinking I could set something like this:
animationView.play()
animationView.isHidden = true
DispatchQueue.main.asyncAfter(deadline: .now() 15 {
animationView.isHidden = false
}
The only issue would be the wait time between the user execution and the animation display...
CodePudding user response:
Look :
animationView.play(fromFrame:, toFrame:, withCompletion:)
or
animationView.play(fromProgress:, toProgress:, withCompletion:)