0

我正在创建一个应用程序,当用户单击任何对象并点击 UIView 时,图像应该放在视图上,并且在任何方向拖动该图像时,它应该重新调整大小。任何人有任何想法这样做,请让我知道。或者我可以获得任何示例代码吗?

谢谢

4

1 回答 1

0
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event

{

UITouch *touch = [[event allTouches] anyObject];

CGPoint touchLocation = [touch locationInView:self.view];

if ([touch view] == photo) {

photo.center = touchLocation;

}

else if ([touch view] == photo1) {

    photo1.center = touchLocation;

}

}

或者您可以在该链接中看到http://www.roseindia.net/tutorial/iphone/examples/iphone-DoubleImageMoveasd.html

于 2012-05-14T09:03:00.120 回答