I am trying to set up an edge swipe gesture in iOS 8 on iPad but getting and error that seems like a bug.
I have the following code:
UIScreenEdgePanGestureRecognizer *edgeRecognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleRightEdgeSwipe:)];
edgeRecognizer.edges = UIRectEdgeRight;
//slide in view code here
2014-10-07 00:04:40.386 Office Log[1531:500896] unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: ; layer = >
I think it's a bug in iOS, which I can confirm on an iPad mini 2 and an iPad Air on iOS 7 or higher, even on the Home Screen.
In "Landscape Left" (Home button on the left) a "Right Edge Gesture" from outside the Screen is not working for me. Test it by your self on the Home Screen.
I reported a bug to Apple 9 Month ago, but noting further happened.
I played a bit with the UIWindow init and when it is a bit bigger than it really is, the Gesture works. Of course this is a horrible fix.
self.window = [UIWindow new]; self.window.rootViewController = [[UIViewController alloc] init]; // Real Size CGRect frame = [UIScreen mainScreen].bounds; // Real Size + 0.000001 self.window.frame = CGRectMake(0, 0, frame.size.width+0.000001, frame.size.height+0.000001); [self.window makeKeyAndVisible];