Moh*_*lim -2 svprogresshud swift
在Swift 3中面对SVProgressHUD中非常罕见的问题
检查pod文件,我没有做错任何事情,如github上的SVProgressHUD所述。
您编写代码的方式是供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)
| 归档时间: |
|
| 查看次数: |
6978 次 |
| 最近记录: |