Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa touch Cocoa Touch-慢速移动CGPointMake_Cocoa Touch - Fatal编程技术网

Cocoa touch Cocoa Touch-慢速移动CGPointMake

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

我使用以下代码在屏幕上移动UIImageView。有了这个代码,它会在屏幕上快速移动,但我希望它能慢慢移动。我需要做什么

[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];