Cocoa touch 在Cocoa Touch中设置图像视图的动画

Cocoa touch 在Cocoa Touch中设置图像视图的动画,cocoa-touch,ipad,Cocoa Touch,Ipad,我需要使一个图像视图动画它的自我打开和关闭的屏幕。我希望当用户点击屏幕时,图像会向上滑动。是否有一种相对简单的方法可以平滑地移动图像视图 感谢您的帮助使用动画块,例如 [UIView beginAnimations:@"slide-up" context:NULL]; imageView.center = CGPointMake(200, -100); // change this to somewhere else you want. [UIView commitAnimations];

我需要使一个图像视图动画它的自我打开和关闭的屏幕。我希望当用户点击屏幕时,图像会向上滑动。是否有一种相对简单的方法可以平滑地移动图像视图


感谢您的帮助

使用动画块,例如

[UIView beginAnimations:@"slide-up" context:NULL];
imageView.center = CGPointMake(200, -100);  // change this to somewhere else you want.
[UIView commitAnimations];
有关详细信息,请参见