- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint currentPoint = [touch locationInView:self.view];
NSLog("%f %f",currentPoint.x,currentPoint.y);
}
我想为我的 ipad 开发一个绘画应用程序。当我使用这些代码并用手指在我的垫子上画一条线时,它会打印 (x,1),(x,3),(x,6),(x,7),(x,12),(x ,15),(x,18)....
在我看来,它应该打印 (x,1),(x,2),(x,3),(x,4),(x,5),(x,6),(x,7),( x,8),(x,9),(x,10),(x,11),(x,12),(x,13),(x,14),(x,15),(x, 16),(x,17),(x,18)....
touchesMoved 不能得到续坐标?