我试图控制抽奖动画的进度,但无法正常工作。它只会发挥全部进度,而且不会停在期望的进度上。
我正在使用pod“ lottie-ios”,git:“ https://github.com/airbnb/lottie-ios.git”,标签:“ 2.1.5”
override func viewDidLoad() {
let animationView = LOTAnimationView(name: "intro-en")
animationView.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height)
animationView.contentMode = .scaleAspectFit
self.view.addSubview(animationView)
animationView.play(fromProgress: 0, toProgress: 0.1) { (true) in
}
}