Cocoa touch Cocoa Touch-慢速移动CGPointMake
我使用以下代码在屏幕上移动UIImageView。有了这个代码,它会在屏幕上快速移动,但我希望它能慢慢移动。我需要做什么Cocoa touch Cocoa Touch-慢速移动CGPointMake,cocoa-touch,Cocoa Touch,我使用以下代码在屏幕上移动UIImageView。有了这个代码,它会在屏幕上快速移动,但我希望它能慢慢移动。我需要做什么 [UIView beginAnimations:@"slide-up" context:NULL]; astroid_1.center = CGPointMake(astroidPosX,astroidPosY); // change this to somewhere else you want. [UIView commitAnimati
[UIView beginAnimations:@"slide-up" context:NULL];
astroid_1.center = CGPointMake(astroidPosX,astroidPosY); // change this to somewhere else you want.
[UIView commitAnimations];
谢谢 您需要设置动画的持续时间:
[UIView setAnimationDuration:1.0];