import Foundation import Lottie import UIKit @objc class Dynamic: NSObject { @objc func createAnimationView(rootView: UIView, lottieName: String) -> LottieAnimationView { let animationView = LottieAnimationView(name: lottieName) animationView.frame = CGRect(x: 0, y: 0, width: 200, height: 150) animationView.center = rootView.center animationView.backgroundColor = UIColor.clear return animationView } @objc func play(animationView: LottieAnimationView) { animationView.play { (success) in RNSplashScreen.setAnimationFinished(true) } } }