我正在使用Lottie框架从JSON文件中加载动画打字指示器。 我想更改指示器颜色的动画。 我不想从JSON文件更改颜色。希望能够以编程方式更改动画视图的颜色。
例如:(。。。。。)->打字指示器(希望更改点的颜色)
例如:(。。。。。)->打字指示器(希望更改点的颜色)
private let animationView = LOTAnimationView(name:
Constants.ImageAssets.typingIndicatorIcon, bundle:Bundle(identifier: Constants.GenericKeys.bundleIdentifier)!)
private func loadTypingIndicator() {
animationView.loopAnimation = true
animationView.translatesAutoresizingMaskIntoConstraints = true
// *** It's not working
animationView.setValue(UIColor.green, forKeypath: "boule.Ellipse 1.Fill 1.Color", atFrame: 0)
animationView.play()
}