Learn how to integrate lottie animations into your android app effortlessly.
Go to your project settings → `"`Package Dependencies`"`
Add: https://github.com/airbnb/lottie-ios
Replace `"`your_animation`"` with the name of your animation.
import Lottie
class ViewController: UIViewController {
var animationView: LottieAnimationView!
override func viewDidLoad() {
super.viewDidLoad()
animationView = LottieAnimationView(name: "your_animation")
animationView.frame = CGRect(x: 0, y: 0, width: 150, height: 150)
animationView.center = view.center
animationView.loopMode = .loop
animationView.play()
view.addSubview(animationView)
}
}
Find free animations at Unicornicons.