user377419
user377419

Reputation: 4999

Cocoa Touch - Slow Moving CGPointMake

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!

Upvotes: 0

Views: 257

Answers (1)

David
David

Reputation: 9945

You need to set the duration of the animation:

[UIView setAnimationDuration:1.0];

Upvotes: 1

Related Questions