执行触摸移动时,如何设置与新图像(点)具有相同固定距离的图像(点)?
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint touchLocation = [touch locationInView:touch.view];
UIImageView *imageView=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Crayon_Black.png"]];
imageView.center = touchLocation;
[drawImage addSubview:imageView];
}
我希望这是有道理的。我只需要完成我的学校项目。提前谢谢大家。