如何进度对话框单击关闭

时间:2012-12-18 09:50:40

标签: objective-c xcode4.5

我的代码:

打开对话框

enter image description here

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

我正在使用MBProgress HUD但我想要对话框点击关闭
如何关闭对话框以单击关闭?

1 个答案:

答案 0 :(得分:1)

它有效!  (虚空)touchesEnded事件必须使用

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