0

I am trying to cancel all current touches in a window/inside the entire app. I tried setting

window.userInteractionEnabled = NO;
window.userInteractionEnabled = YES;

But the touches that are active at the moment when I disable the user interaction are not cancelled. I also tried setting alpha to 0 and back to 1 and also setting hidden to YES and NO with no luck.

This:

[[UIApplication sharedApplication] beginIgnoringInteractionEvents];

also didn't work.

JonasG
  • 9,274
  • 12
  • 59
  • 88

1 Answers1

0

Try something like this:

[[yourSuperView subviews]
   makeObjectsPerformSelector:@selector(setUserInteractionEnabled:)
   withObject:[NSNumber numberWithBool:FALSE]];
Wyetro
  • 8,439
  • 9
  • 46
  • 64