-1

据我所知,没有公共 API 可以以采样率收集接触点/位置。有谁知道任何解决方法来做到这一点?非常感谢您的任何想法和建议。

4

3 回答 3

3

UITouch不是您想要的吗?

于 2012-05-07T21:26:55.630 回答
0

尝试使用 NSTimer:

NSTimer* myTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/TIMES_PER_SECOND target:self selector:@selector(sampleTouches:) userInfo:nil repeats:YES];

然后,实现回调函数:

-(void)sampleTouches:(NSTimer*)timer {
    // Call a method/function here that gets UITouch data.
}
于 2012-05-07T22:11:07.343 回答
0

事实证明,以采样率记录接触点不会使记录更快或更准确。触摸方法是要走的路。通过实现 touchesBegan、touchesMoved、touchesEnd 方法,我能够尽可能快地记录提供给视图的触摸点。

于 2012-05-10T16:15:36.643 回答