windowServerHitTestWindow中的意外nil

windowServerHitTestWindow中的意外nil

本文介绍了_UIApplicationHandleEventFromQueueEvent,_windowServerHitTestWindow中的意外nil窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正试图在iPad上的iOS 8中设置边缘滑动手势,但是获取和错误似乎是一个错误。

I am trying to set up an edge swipe gesture in iOS 8 on iPad but getting and error that seems like a bug.

我有以下代码:

    UIScreenEdgePanGestureRecognizer *edgeRecognizer = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleRightEdgeSwipe:)];
edgeRecognizer.edges = UIRectEdgeRight;
[self.view addGestureRecognizer:edgeRecognizer];

然后我处理手势:

-(void)handleRightEdgeSwipe:(UIGestureRecognizer*)sender
{
//slide in view code here
}

问题是它不会每次都检测到右边缘滑动。有时它会多次检测到它。

The problem is that it doesn't detect the right edge swipe every time. And sometimes it detects it multiple times.

无论是否检测到它在iPad上滑动右边缘时总是在控制台中显示以下信息:

Whether it detects or not it always shows the following information in the console when swiping the right edge on iPad:

此消息的含义是什么?我如何修复它以便始终检测到右边缘滑动?

What does this message mean and how can I fix it so that the right edge swipe is detected consistently?

推荐答案

我认为这是iOS中的一个错误,我可以在iOS 7或更高版本的iPad mini 2和iPad Air上确认,甚至在主屏幕上。

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.

我在9个月前向Apple报告了一个错误,但注意到了进一步的发生。

I reported a bug to Apple 9 Month ago, but noting further happened.

我在UIWindow初始化时玩了一下,当它比实际大一点时,Gesture工作。当然这是一个可怕的修复。

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];

这篇关于_UIApplicationHandleEventFromQueueEvent,_windowServerHitTestWindow中的意外nil窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 22:30