迅速的SVProgressHUD问题3

Moh*_*lim -2 svprogresshud swift

在Swift 3中面对SVProgressHUD中非常罕见的问题

Swift 3中SVProgressHUD的错误

检查pod文件,我没有做错任何事情,如github上的SVProgressHUD所述。

SVProgressHUD POD文件

iOS*_*eek 6

您编写代码的方式是供Objective-C快速使用以下代码格式

在此处输入图片说明

import UIKit
    import SVProgressHUD

class SubViewsViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.

        SVProgressHUD.show()

         Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(self.update), userInfo: nil, repeats: true)

  //With Dispatch Queue
    DispatchQueue.global(qos: .userInitiated).async {
        SVProgressHUD.show()
        // Bounce back to the main thread to update the UI
        DispatchQueue.main.async {
            Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(self.update), userInfo: nil, repeats: true)
        }
    }


    }

    func update() {
        SVProgressHUD.dismiss()
    }

}
Run Code Online (Sandbox Code Playgroud)