У меня есть 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