【发布时间】:2019-09-03 23:42:39
【问题描述】:
我有动画 Lottie,但我无法使用资产运行动画。动画正在播放,但没有资产。
我把我的资产放在这条路上。网络播放器很好玩。但在 iOS 中的控制台打印:-[LOTLayerContainer _setImageForAsset:]:警告:找不到图像:img_0.png。对于所有图像都是如此。
Swift 代码:
let animation = LOTAnimationView(name: "data")
animation.frame = self.view.frame
animation.contentMode = .scaleAspectFill
self.view.addSubview(animation)
animation.play()
路径:
【问题讨论】:
-
您确定 png 已添加到目标中吗?
标签: ios swift animation lottie