Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone上触发触控事件的频率如何?_Iphone_Objective C - Fatal编程技术网

iPhone上触发触控事件的频率如何?

iPhone上触发触控事件的频率如何?,iphone,objective-c,Iphone,Objective C,向最顶级的应用程序提供触摸事件的频率如何 例如,在屏幕上触摸、拖动手指(1秒),释放您可以通过覆盖以下UIResponder方法来自己分析: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; - (void)touchesEnded:(NSSet *)touches withEvent

向最顶级的应用程序提供触摸事件的频率如何


例如,在屏幕上触摸、拖动手指(1秒),释放您可以通过覆盖以下
UIResponder
方法来自己分析:

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;

当触摸开始时保存一个日期戳,当触摸移动时增加一个静态计数器,当触摸结束时保存另一个时间戳,然后进行一些简单的划分:速率=(#触摸次数)/(时间间隔)

取决于设备和操作系统以及运行的其他内容。他们一有机会就会被解雇。这就是为应用程序提供最流畅、最准确的移动方式。

不同代iPhone和不同操作系统版本的应用程序会有所不同吗?速度会有所不同吗?我不知道。我想是的,但唯一确定的方法是你自己运行它,在你自己的设备上。这很奇怪。我希望听到对反对票的解释。