I'm trying to use Lottie animations inside my ios app but I can't get them to work. I've seen people use LOTAnimationViews
but I can't import or use this class. I've added an Animation folder with my animations in.
ViewController:
class CardStackViewController: UIViewController, CLLocationManagerDelegate, NetworkManagerDelegate {
...
private let animationView = AnimationView()
...
...
func didFail(with error: Error) {
if let animation = Animation.named("error", subdirectory: "Animations") {
animationView.animation = animation
animationView.loopMode = .loop
view.addSubview(animationView)
animationView.play()
}
print("---DIDFAIL WITH ERROR---", error.localizedDescription, error)
}
...
}