Код: Выделить всё
Animation.loadedFrom(url: url, closure: { [weak self] animation in
if let animation = animation {
self?.animateView.animation = animation
self?.animateView.loopMode = .loop
self?.animateView.play()
} else {
self?.animateView.imageProvider = Asset.placeholder.image as! any AnimationImageProvider
self?.animateView.loopMode = .loop
self?.animateView.play()
}
}, animationCache: nil)
Подробнее здесь: https://stackoverflow.com/questions/790 ... tion-swift