LottieProgressHUD 3.0.3

LottieProgressHUD 3.0.3

Wipoo Shinsirikul 维护。



  • by
  • Wipoo Shinsirikul

LottieProgressHUD

pod Carthage compatible

ProgressHUD 使用来自 Airbnb 的 Lottie

安装

CocoaPods

pod 'LottieProgressHUD'

Carthage

github "kingpowerclick/LottieProgressHUD"

使用方法

快速开始

import Lottie
import LottieProgressHUD

class AppDelegate: UIResponder, UIApplicationDelegate
{
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
    {
        if let progressAnimation = Animation.named("progress-animation.json")
        {
            ProgressHUD.register(animation: progressAnimation)
        }
        else
        {
            fatalError("Unable to find the animation file")
        }
 
        return true
    }
}

class ViewController: UIViewController
{
    private func buttonDidTap()
    {
        ProgressHUD.show()

        someAsyncOps(
            completion: {
                ProgressHUD.dismiss() })
    }
}

关于Lottie的更多信息,请点击这里 这里