touchesEnded:withEvent: is not called

左心房为你撑大大i 提交于 2019-12-22 00:34:12

问题


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

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.)

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


回答1:


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.



来源:https://stackoverflow.com/questions/23194805/touchesendedwithevent-is-not-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!