Search code examples
iosuiwindow

Disable window interaction iOS


I have two UIWindows on the screen and one is behind the other. is there a way to handle the user touch with the window that is behind?

Thanks


Solution

  • Thanks, but i just found the way:

      - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
      {
          for (UIWindow *win  in [[UIApplication sharedApplication] windows]) {
              if (win.tag != self.tag) {
                  return [win hitTest:point withEvent:event];
              }
          }
          return nil;
      }