In my application I have UINavigationController inside UITabBar
When I display my HUD the whole screen is locked except TabBar. So the only way to dismiss my HUD is to tap on a tab.
I would also like to dismiss it when I tap on “back” button on my NavigationController
Here is my code:
hud = [[MBProgressHUD alloc] initWithView:self.navigationController.view];
[self.navigationController.view addSubview:hud];
hud.delegate = self;
hud.labelText = @"Loading...";
[hud show:YES];
You’re adding the hud view to the navigation controller – that’s why you cannot interact with navigation bar.
What you want to achieve is to lock
self.navigationController.topViewController.viewwhich, I think, in your case is accessible viaself.view.Try the following:
Let us know if above worked for you. If not, I’ll improve the answer to find a solution.