here is my code , but it showing the progress . is there any error in this code? please give some idea to fix this, or give some link related to this.
class Approval: UIViewController {
var hud: MBProgressHUD = MBProgressHUD()
override func viewDidLoad() {
super.viewDidLoad()
fetchData()
}
func fetchData(){
hud.show(true)
// doing some http request
dispatch_async(dispatch_get_main_queue()) {
hud.hide(true)
}
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…