How to use MBProgressHUD with swift

后端 未结 10 1718
北海茫月
北海茫月 2020-12-08 02:23

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          


        
10条回答
  •  南方客
    南方客 (楼主)
    2020-12-08 02:56

    Added to @EricDXS's answer,

    The Swift 3 version is here

    To show:

    let loadingNotification = MBProgressHUD.showAdded(to: self.view, animated: true)
    loadingNotification.mode = MBProgressHUDMode.indeterminate
    loadingNotification.label.text = "Loading"
    

    To dismiss:

    loadingNotification.hide(animated: true)
    

提交回复
热议问题