0

私のコード:

ダイアログボックスを開く

ここに画像の説明を入力

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

私は使用していますが、ダイアログボックスをクリックして閉じMBProgress HUD たいのですが、閉じる
をクリックしてダイアログボックスを閉じる方法は?

4

1 に答える 1

1

うまくいきました!(Void) touchesEnded イベントを使用する必要があります

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
[MBProgressHUD hideHUDForView:self.view animated:YES];
}
于 2012-12-18T11:58:42.593 に答える