Is there a way to make the MBProgressHUD show at the bottom or top of the screen?
I have tried setting the frame using [hud setFrame:....];
, initW
We can change position of MBProgressHUD
via change in yOffset
and xOffset
.
Below line of code is for place MBProgressHUD
at bottom.
let hud = MBProgressHUD.showAdded(to: view, animated: true)
hud?.mode = .text
hud?.labelText = json!["message"] as! String
hud?.yOffset = Float(view.frame.size.height*2/5);
hud?.removeFromSuperViewOnHide = true
hud?.margin = 10.0
hud?.hide(true, afterDelay: 2)