views:

12

answers:

1

How can I animate the movement of a label or image? I would just like to make a slow transition from one location on the screen to another (nothing fancy).

+1  A: 

You're looking for the -beginAnimations:context: and -commitAnimations methods on UIView.

In a nutshell, you do something like:

[UIView beginAnimations:nil context:NULL]; // animate the following:
    myLabel.frame = newRect; // move to new location
    [UIView setAnimationDuration:0.3];
[UIView commitAnimations];
David Gelhar
Perfect! Thank you very much :)
Nippysaurus