document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. import UIKit
  2. import Lottie
  3.  
  4. class SecondViewController: UIViewController {
  5.   @IBOutlet weak var animationContainerView: UIView!
  6.   @IBOutlet weak var olImageView: UIImageView!
  7.  
  8.   open var lottieAnimationView: AnimationView?
  9.  
  10.   override func viewDidLoad() {
  11.     super.viewDidLoad()
  12.  
  13.     // Set an id to the OrangeLoops Image View
  14.     olImageView.hero.id = "OrangeLoops-Logo"
  15.  
  16.     // Create and configure animation to be displayed
  17.     setupLottieAnimationView()
  18.  
  19.     // Start animation
  20.     lottieAnimationView?.play()
  21.   }
  22.  
  23.   func setupLottieAnimationView() {
  24.     // Load Lottie file into an animation view
  25.     lottieAnimationView = AnimationView(name: "lottie-animation")
  26.  
  27.     guard let lottieAnimationView = lottieAnimationView else { return }
  28.  
  29.     lottieAnimationView.backgroundBehavior = .pauseAndRestore
  30.     lottieAnimationView.loopMode = .loop
  31.   }
  32. }
');