2010-08-04 65 views
0

我使用下面的代码跨屏幕移动UIImageView。有了这个代码,它在屏幕上弹出,但我希望它慢慢移动。我需要做什么?可可触摸 - 缓慢移动CGPointMake

[UIView beginAnimations:@"slide-up" context:NULL]; 
     astroid_1.center = CGPointMake(astroidPosX,astroidPosY); // change this to somewhere else you want. 
     [UIView commitAnimations]; 

谢谢!

回答

1

您需要设置动画的持续时间:

[UIView setAnimationDuration:1.0];