Reputation: 1459
Im trying to move a UIImage from the top of the screen to the top. I know how to do Animations, but if i did it that way, there would be a few hundred images. I know that i can use something called CGPoint? Can someone give me a example of how to move a image with a CGPoint?
Thanks very much appreciated.
Upvotes: 0
Views: 2637
Reputation: 24481
Do something like this:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:3.0];
[myImageView setFrame:CGRectMake(0, 0, 50, 50];
[UIView commitAnimations];
That will make the imageView goto the top from whatever position it is currently in.
Upvotes: 1