为什么UIScrollView取消我在iPad上的触摸,但不取消iPhone上的触摸? [英] Why does UIScrollView cancel my touches on the iPad, but not on the iPhone?

查看:111
本文介绍了为什么UIScrollView取消我在iPad上的触摸,但不取消iPhone上的触摸?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个UIScrollView子类,我实现了所有这些4触摸事件处理方法,如 -touchesBegan:withEvent:等。

I have an UIScrollView subclass where I implement all of those 4 touch event handling methods like -touchesBegan:withEvent:, etc.

在iPhone上,跟踪工作正常。当手指沿滚动视图移动时,我得到了很多-touchesMoved:withEvent:调用。

On the iPhone, the tracking works fine. I get plenty of -touchesMoved:withEvent: calls while the finger moves along the scroll view.

我设置了 self.canCancelContentTouches = NO ;
我也覆盖了这个:

I've set the self.canCancelContentTouches = NO;. I've also overwritten this:

- (BOOL)touchesShouldCancelInContentView:(UIView *)view {
    return NO;
}

拖动约5个点后,它已经取消了触摸。总是。在视图层次结构中,我只有这个UIScrollView。我可以开始拖动我想要的任何地方。大约5点接触后取消。总是。无处不在。

After dragging about 5 points or so, it already cancels the touches. Always. I have nothing else than this UIScrollView in my view hierarchy. I can start dragging anywhere I want. After about 5 points touches get cancelled. Always. Anywhere.

奇怪的是:只在iPad上发生,而在iPhone或iPod touch上却没有。 UIScrollView中的错误?

And the strange thing: Only happens on the iPad, but not on the iPhone or iPod touch. A bug in UIScrollView?

推荐答案

手机上有哪个版本的iOS?

What version of iOS is on the your phone?

iPad仍然回到了3.2.x,因此在随后的手机版中可能已经修复了许多尚未进入iPad的东西...

The iPad is still back at 3.2.x, so there might be lots of things fixed already in subsequent phone releases that haven't made their way to the iPad yet...

这篇关于为什么UIScrollView取消我在iPad上的触摸,但不取消iPhone上的触摸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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