8

I'm using an MBProgressHUD inside of a UITableViewController. While I am able to get the HUD to display successfully, the HUD intercepts all of the screen's touch notifications and prevents scrolling in my UITableView.

I know that the intended functionality of MBProgressHUD might be to lock up the interface (say, during a blocking operation), but I want to know how to forward the touch events to the proper places regardless.

Any ideas?

Dany Joumaa
  • 2,030
  • 6
  • 30
  • 45

3 Answers3

20

The MBProgressHUD is a subclass of an UIView so you have to disable the user interaction with it. So:

youMBProgressHUDPointer.userInteractionEnabled=NO;

Naka
  • 1,008
  • 13
  • 14
4

Figured it out. The following code needs to be added to MBProgressHUD's code:

- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
// UIView will be "transparent" for touch events if we return NO
return (NO);
}
Dany Joumaa
  • 2,030
  • 6
  • 30
  • 45
0

Check my answer here. The MBProgressHUD blocks interactions at application level. You need to devise a way to get around that by putting some custom logic.

Community
  • 1
  • 1
Ziya
  • 81
  • 1
  • 6