touchesEnded:withEvent:未被调用 [英] touchesEnded:withEvent: is not called

查看:106
本文介绍了touchesEnded:withEvent:未被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我用两根手指快速点击屏幕,则会调用 touchesBegan ,但不会调用 touchesEnded 其中一个接触。

If I tap the screen too fast with two fingers, touchesBegan is called, but touchesEnded is not called for one of the touches.

我用谷歌搜索过疯狂,这似乎是人们至少从2010年以来一直存在的一个严重问题。显然它还没有固定。有没有人知道这方面的解决方法,或者有没有办法确定没有4种方法或手势识别器的触摸? (它们往往导致延迟,这对我来说是不切实际的。)

I've googled like crazy and this seems to be a serious issue that people have been having since at least 2010. Apparently it hasn't been fixed. Does anyone know of a workaround for this or is there a way to determine touches without the 4 methods or gesture recognizers? (They tend to cause a delay which isn't practical for me.)

顺便说一句,所有4种方法都已实施。我很想知道对此的任何想法,因为我将要失去理智。谢谢。

By the way, all 4 methods are implemented. I would appreciate any thoughts on this as I'm about to lose my mind. Thanks.

推荐答案

我想这有点晚了,Apple可能已经解决了这个问题,但我的解决方案只是放置了AppDelegate.m文件中的四种触摸处理方法,然后将触摸转发给我的视图控制器。我不知道为什么这样做或我怎么弄清楚,但那是我的解决方案。我错误地认为Xcode示例项目的触摸工作正常,但现在我知道了。希望这有助于某人。

I suppose this is a little late and Apple may have fixed the issue, but my solution was simply to place the four touch handling methods in the AppDelegate.m file and then forward the touches to my view controller. I don't know why this works or how I figured it out, but that was my solution. I was wrong to assume the Xcode sample project had the touches working properly, but now I know. Hope this helps someone.

这篇关于touchesEnded:withEvent:未被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆