Question: I need to block the interface until the `MBProgressHUD` operation is done. I did refer this thread,

[Block interface until operation is done](https://stackoverflow.com/questions/8628981/block-interface-untill-operation-is-done)

According to it, we should disable each individual item which wont work for me. My case is I need to disable user from clicking back button. I did try `HUD.userInteractionEnabled = YES` which disable every controller except the back button. Is there any way of blocking user from popping out from that controller?

Regards,  

Dilshan

Answer: 
You can add the MBProgressHUD to the navigation controller's view so that it also prevents interaction with the back button:

```
[MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];

```
If you want a particular control to make enable when HUD is displaying , you can simply add the line `[self.view bringSubviewToFront:yourControl];` in your `showHUD` method as

```
-(void) showHUD:(UIView *)view
{

    if (self.HUDdisplayed == NO)
    {
        self.HUDdisplayed = YES;
        HUD = [[MBProgressHUD showHUDAddedTo:self.view animated:YES] retain];
    }
//    HUD.delegate = self;
    [self.view bringSubviewToFront:HUD];
     [self.view bringSubviewToFront:yourControl];

}

```