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