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
I solved it like this:
import UIKit
class Loader: NSObject {
class func show(message:String = "Processing...", delegate: UIViewController) {
var load : MBProgressHUD = MBProgressHUD()
load = MBProgressHUD.showHUDAddedTo(delegate.view, animated: true)
load.mode = MBProgressHUDMode.Indeterminate
if message.length > 0 {
load.labelText = message;
}
UIApplication.sharedApplication().networkActivityIndicatorVisible = true
}
class func hide(delegate:UIViewController) {
MBProgressHUD.hideHUDForView(delegate.view, animated: true)
UIApplication.sharedApplication().networkActivityIndicatorVisible = false
}
}