Reputation:
I display a HUD
HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUD];
HUD.delegate = self;
HUD.labelText = @"Sync";
HUD.detailsLabelText = @"....";
HUD.square = YES;
[HUD show:YES];
Then later I remove it
[MBProgressHUD hideHUDForView:self.view animated:YES];
But it no longer will accept touches to any of the buttons?
I've been playing with this for hours but cant get it fixed.
Is there something I am missing?
Do I need to set the self.view as first responder again or something?
Upvotes: 0
Views: 82
Reputation: 4164
From what I remember you still need [self.view addSubview:HUD];
in your code (That might have changed.
I think your problem is that you aren't removing the HUD from the view,
calling:
[HUD removeFromSuperView];
when your finished with it, should fix your problem the method
[MBProgressHUD hideHUDForView:self.view animated:YES];
Only hides it, doesn't remove it completely.
Upvotes: 1
Reputation: 8564
I think you need not to add HUD? As you only need to show it(and you are doing it).
HUD is added on your view thats why view is not responding.
Remove following line of code:
[self.view addSubview:HUD];
Upvotes: 0