-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event touchesForView:self.view] anyObject];
CGPoint point = [touch locationInView:self.view];
basketView.center = CGPointMake(point.x, point.y);
}
我目前有这段代码可以让用户用手指移动图像。但是,如果我想在屏幕上添加多个可移动图像(比如我还希望能够移动 UIImages basketView2 和 basketView3),我将如何更改代码以实现这一点?