tags:

views:

21

answers:

1

I'm using the following code to move an UIImageView across screen. With this code it rockets across the screen but I want it to slowly move. What do I need to do?

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

Thanks!

+1  A: 

You need to set the duration of the animation:

[UIView setAnimationDuration:1.0];
David