// // LottieView.swift // VPNUI // // Created by Mac on 2024/9/26. // import Foundation //import Lottie import SwiftUI import Lottie struct LottieView: UIViewRepresentable { var animationFileName: String let loopMode: LottieLoopMode func updateUIView(_ uiView: UIViewType, context: Context) { } func makeUIView(context: Context) -> Lottie.LottieAnimationView { let animationView = LottieAnimationView(name: animationFileName) animationView.loopMode = loopMode animationView.play() animationView.contentMode = .scaleAspectFit return animationView } }