开发者

Objective C - moving an image

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 imag开发者_Go百科e with a CGPoint?

Thanks very much appreciated.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜