I\'ve added a UIView
containing a UITapGestureRecognizer
as my key window\'s subview. It shows properly, however when I tap my view, the target met
I ended up being able to create a full-screen subview which accepted gestures by adding it to the app's keyWindow, assuming makeKeyAndVisible has been called first:
myView.hidden = YES;
[[[UIApplication sharedApplication] keyWindow] addSubview:myView];
Then to show it above the status bar:
[[UIApplication sharedApplication] keyWindow].windowLevel = UIWindowLevelStatusBar + 1;
myView.hidden = NO;
And to change it back:
[[UIApplication sharedApplication] keyWindow].windowLevel = UIWindowLevelNormal;
myView.hidden = YES;
This just changes the position of your app's main window (including all of its subviews) within the window hierarchy. Hope that helps!