My codes are shown below:
CATransition *transition = [CATransition animation]; transition.duration = duration
I hope to get the final CATransition / Animation event. Is it possible?
CAAnimation (in which CATransition is a subclass) has a delegate method animationDidStop:finished: that you can use.
animationDidStop:finished:
Set the delegate property and implement the method:
CATransition *transition = [CATransition animation]; transition.duration = duration; transition.delegate = self; //other settings... //call addAnimation... ... - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag { //do what you need to do when animation ends... }