本文介绍了iOS 中 UITouch 时间戳的精度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 中 UITouch 类的时间戳属性有多精确?毫秒?几十毫秒?我正在将 iPad 的内部测量值与贴在屏幕上的自定义触摸检测电路进行比较,两者之间存在相当大的差异(标准偏差 ~ 15 毫秒).

How precise is the timestamp property of the UITouch class in iOS? Milliseconds? Tens of milliseconds? I'm comparing an iPad's internal measurements with a custom touch detection circuit taped on the screen, and there is quite a bit of variability between the two (standard deviation ~ 15ms).

我已经看到它表明时间戳是根据帧刷新间隔离散化的,但我得到的分布看起来是连续的.

I've seen it suggested that the timestamp is discretized according to the frame refresh interval, but the distribution I'm getting looks continuous.

推荐答案

在 iPad Air 2 之前,iDevices 的触摸检测轮询是 60 Hz.iPad Air 2 首次能够以 120 Hz 的频率轮询触摸.

Prior to the iPad Air 2, the touch detection polling of the iDevices is 60 Hz. The iPad Air 2 is for the first time able to poll touches at 120 Hz.

因此,虽然时间戳的数字似乎非常精确(点后有很多数字),但事实并非如此.

So while the numbers of the timestamp seem to be very precise (many digits after the dot), they are not.

这是一个 WWDC 视频,它是我见过的最好的 WWDC 视频,它详细解释了所有内容:https://developer.apple.com/videos/wwdc/2015/?id=233

This is a WWDC video, it's the best WWDC video I've ever seen and it explains everything in detail:https://developer.apple.com/videos/wwdc/2015/?id=233

只是因为我很好奇:你们有什么样的定制触摸检测电路?

Just because I'm curious: What kind of custom touch detection circuit do you have?

这篇关于iOS 中 UITouch 时间戳的精度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 10:21