简体   繁体   English

iPad的响应速度有多快?

[英]How quickly does the iPad respond to touches?

I'm talking, how much time can be expected to elapse between the user touching the screen and something like touchesBegan being called? 我在说,用户触摸屏幕之间可以预计会有多少时间和触摸被称为触摸的东西? (Or something lower level, if such a thing is available.) Sub-millisecond? (或者更低级别的东西,如果有这样的东西可用。)亚毫秒? Multiple milliseconds? 多毫秒? Tens? 十?

I'm pretty sure touchesBegan is called very quickly (meaning, with whatever minimal delay exists in the event path). 我非常确定touchesBegan被称为非常快(意味着,事件路径中存在任何最小延迟)。 I've noticed in my code that I get a single touchesBegan for a two-fingered touch with both touches already in the list. 我已经注意到在我的代码中,我得到了一个单一的touchesBegan,用于两指触摸,两个触摸已经在列表中。 I assume that I don't touch both fingers down together very precisely but from what I've seen the touchesBegan event is delivered within a few milliseconds. 我假设我不会非常精确地将两个手指放在一起但是从我看到的touchesBegan事件在几毫秒内传递。 I suspect Apple holds the touches very briefly before passing them along in order to batch them for more efficient handling, possibly also using that delay to filter out accidental touches (sort of like de-bouncing a mechanical switch). 我怀疑Apple在传递它们之前非常简短地接触它们以便批量处理它们以便更有效地处理,可能还使用延迟来过滤掉意外触摸(有点像去机械开关)。

I use a touchesBegan in my view to freeze my scrolling animations and my perception is that the scrolling stops immediately when I touch the screen. 我在视图中使用touchesBegan来冻结我的滚动动画,我的感觉是当我触摸屏幕时滚动立即停止。

The real delays come from the gesture recognizers. 真正的延迟来自手势识别器。 They often have to wait to see if you've moved far enough to signify a pan or if you've held long enough to be holding or if you've released without dragging to signify a tap. 他们经常不得不等待,看你是否已经移动足够远以表示平底锅,或者你是否已经持有足够长的时间来持有,或者如果你已经释放而没有拖动以表示水龙头。 Those delays can be substantial of course, though they're still only a fraction of a second in my experience. 当然,这些延迟可能很大,但根据我的经验,它们仍然只有一小部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM