如何MBProgress对话框单击关闭

问题描述:

我的代码:如何MBProgress对话框单击关闭

打开对话框

enter image description here

- (void)viewDidLoad 
{ 
    //Start 
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 
    hud.labelText = @"loading..."; 
} 

我使用MBProgressHUD但我想对话框单击关闭
如何关闭对话框点击关闭?

+0

想法是有在做负载关闭'MBProgressHud'当它这样做的代码。 – dandan78

+0

是的,当它完成,但在框中点击将被关闭它的盒子点击事件?这是我的隐藏代码[MBProgressHUD hideHUDForView:self.view animated:YES]; – Darkface35

它的工作! (无效)touchesEnded事件必须使用

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ 
[MBProgressHUD hideHUDForView:self.view animated:YES]; 
}