//===========***Delegate***============//
#pragma mark - MBProgressHUDDelegate
-(void)showSuccessMessage:(NSString *)msg
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];
hud.userInteractionEnabled = NO;
// Configure for text only and offset down
hud.mode = MBProgressHUDModeText;
hud.labelText = msg;
hud.margin = 10.f;
hud.removeFromSuperViewOnHide = YES;
[hud hide:YES afterDelay:2];
}
-(void)showLoadView
{
HUD = [[MBProgressHUD alloc]init];
[self.view addSubview:HUD];
HUD.delegate = self;
[HUD show:YES];
}
-(void)showDismissLoadView
{
[HUD hide:YES];
}
-(void)hudViewWasTapped {
[HUD hide:YES];
if (HUD != nil) {
[HUD removeFromSuperview];
HUD = nil;
}
}