Which is the most elegant and modular way to chain animation in a Core Animation context?
I mean to do animations that starts just when other finis
I pull this off using the setCompletionBlock
method to define a closure that triggers the next animation when the first one is finished:
[CATransaction begin]
layer1.property = new_property;
CATransaction.setCompletionBlock {
[CATransaction begin]
layer2.property2 = new_property2;
[CATransaction commit];
}
[CATransaction commit];