Changing location after CommitAnimations
Posted
by
Will Youmans
on Game Development
See other posts from Game Development
or by Will Youmans
Published on 2012-05-14T21:10:21Z
Indexed on
2012/05/31
16:51 UTC
Read the original article
Hit count: 203
iphone
|objective-c
I'm using the following code to move a UIImageView
:
shootImg.image = [UIImage imageNamed:@"Projectile Left 1.png"];
[UIView beginAnimations:nil context:nil];
shootImg.center = CGPointMake(shootImg.center.x+1000, shootImg.center.y);
[UIView commitAnimations];
This works but what I want to do is after [UIView CommitAnimations];
I want to set the location of shootImg
using CGPointMake
. If I just put it after commitAnimations
then the animation doesn't fully complete. Any suggestions? I'm not using any frameworks like cocos2d and if you need to see any more code just ask.
© Game Development or respective owner