本文介绍了获取历史积分iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhone 中绘制时,是否有任何函数或算法可以捕捉所有要点?像在Android中一样,这里有历史要点。

Is there any function or algorithm to catch all the points when drawing in iPhone? Like in Android, where we have gethistoical points.

推荐答案

检查方法 touchesBegan:withEvent: touchesMoved:withEvent: touchesEnded:withEvent: touchesCancelled: withEvent:以检测运动

Check the methods touchesBegan:withEvent:, touchesMoved:withEvent:, touchesEnded:withEvent: and touchesCancelled:withEvent: to detect movements

例如,使用-touchesMoved:withEvent方法:

For example using the method -touchesMoved:withEvent:

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint currentPosition = [touch locationInView:self.view];
    NSLog(@"%@", NSStringFromCGPoint(currentPosition));
}

有关更多信息,请参见

For more info check the documentation of the UIResponder class

这篇关于获取历史积分iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 14:15