Various fixes

This commit is contained in:
Ilya Laktyushin
2023-04-06 05:56:47 +04:00
parent 33a979fc7a
commit dc7541dada
3 changed files with 95 additions and 47 deletions

View File

@@ -131,6 +131,12 @@ public final class AnimationNode: ASDisplayNode {
}
}
public func setColors(colors: [String: UIColor]) {
for (key, value) in colors {
self.animationView()?.setValueProvider(ColorValueProvider(value.lottieColorValue), keypath: AnimationKeypath(keypath: "\(key).Color"))
}
}
public func setAnimation(data: Data) {
if let json = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
let animation = try? Animation(dictionary: json)