You can place a transparent UIWindow
above the status bar, and then give that UIWindow
a UISwipeGestureRecognizer
.
See MTStatusBarOverlay on how to add a UIWindow
over the status bar.
Specifically, create a UIWindow
like so:
UIWindow *window = [[UIWindow alloc] init];
window.frame = [[UIApplication sharedApplication] statusBarFrame];
window.windowLevel = UIWindowLevelStatusBar + 1.0f;
[window makeKeyAndVisible];
then add your UISwipeGestureRecognizer
to it.
If this doesn't work immediately, you may have to set the backgroundColor
property to be non-clear. Clear UIViews
pass through touches (although I believe they should still work with UIGestureRecognizers
.