Если вы уверены, что делаете это со слоями, то вы можете попробовать, как следует
Использование блока завершения в транзакциях CAT
-(void)animateThreeAnimationsOnLayer:(CALayer*)layer animation:(CABasicAnimation*)firstOne animation:(CABasicAnimation*)secondOne animation:(CABasicAnimation*)thirdOne{
[CATransaction begin];
[CATransaction setCompletionBlock:^{
[CATransaction begin];
[CATransaction setCompletionBlock:^{
[CATransaction begin];
[CATransaction setCompletionBlock:^{
//If any thing on completion of all animations
}];
[layer addAnimation:thirdOne forKey:@"thirdAnimation"];
[CATransaction commit];
}];
[layer addAnimation:secondOne forKey:@"secondAnimation"];
[CATransaction commit];
}];
[layer addAnimation:firstOne forKey:@"firstAnimation"];
[CATransaction commit];
}
Другой способ - применить задержку для начала анимации.
-(void)animateThreeAnimation:(CALayer*)layer animation:(CABasicAnimation*)firstOne animation:(CABasicAnimation*)secondOne animation:(CABasicAnimation*)thirdOne{
firstOne.beginTime=0.0;
secondOne.beginTime=firstOne.duration;
thirdOne.beginTime=firstOne.duration+secondOne.duration;
[layer addAnimation:firstOne forKey:@"firstAnim"];
[layer addAnimation:secondOne forKey:@"secondAnim"];
[layer addAnimation:thirdOne forKey:@"thirdAnim"];
}
А если Вы собираетесь использовать UIVIew Animation
//if View is applicable in your requirement then you can look this one;
-(void)animateThreeAnimationOnView{
[UIView animateWithDuration:2.0 animations:^{
//first Animation
} completion:^(BOOL finished) {
[UIView animateWithDuration:2.0 animations:^{
//Second Animation
} completion:^(BOOL finished) {
[UIView animateWithDuration:2.0 animations:^{
//Third Animation
}];
}];
}];
}