0
当我点击一个按钮时,我需要重新启动我的动画。当我点击一个按钮时,重新启动动画
这是我的动画的代码:
imgStar.frame = CGRectMake(205, 6, imgStar.frame.size.width, imgStar.frame.size.height);
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
imgStar.transform = CGAffineTransformMakeTranslation(-4, 340);
[UIView commitAnimations];
的问题是:当我再次点击(点击第二次)我的按钮动画不能正常工作!
你能帮助我吗?
为什么这个动画第二次不起作用? – Dany 2010-12-20 13:25:48