1
我有5個不同的動畫,動畫然後一個接一個消失。有沒有辦法將它們放在一個無限循環中,以便動畫#1開始和結束,然後動畫#2開始和結束等等。?整個過程會在無限循環中重複。無限循環上的動畫
我在延遲單獨的塊中有動畫。我猜測有這樣做的更好方法。這是我現在擁有的:
-(void) firstAnimation {
[UIView beginAnimations:@"Fade Out Image" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDelay:40];
[UIView setAnimationRepeatCount:30];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
theImage.alpha = 1;
theImage.alpha = 0.1;
[UIView commitAnimations];
[self secondAnimation];
}
-(void) secondAnimation {
tapImage2.hidden = NO;
[UIView beginAnimations:@"Fade Out Image" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDelay:53];
[UIView setAnimationRepeatCount:29];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
theImage2.alpha = 1;
theImage2.alpha = 0.1;
[UIView commitAnimations];
[self thirdAnimation];
}
然後繼續5動畫。謝謝你的幫助。
謝謝。這是一個更好的方法。 – hanumanDev 2010-10-11 20:04:03