要运行示例项目,请克隆该仓库,然后首先从示例目录运行 pod install
import SwiftUI
import TLottie
struct MainView: View {
var body: some View {
TLottieView(loopMode: .loop, contentMode: .scaleAspectFit , fileName: "loading" ).frame(width: 160, height: 60, alignment: .center)
}
}
#Preview {
MainView()
}
pod lottie-ios
TLottie 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod 'TLottie'
the-best-is-best,[email protected]
TLottie 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。