如何知道coreanimation何时结束

如何知道coreanimation何时结束,animation,core-animation,Animation,Core Animation,我正在用核心动画制作一些动画,但是我找不到一种方法来知道动画块何时完成,比如在UIVIew动画块中 setAnimationDidStopSelector: 在核心动画中我如何知道这一点,感谢您的帮助如果您使用的是CAAnimation实例,请查看其代理的animationDidStop:finished: CAAnimation * animation = [CAAnimation animation]; animation.delegate = yourDelegate; // could

我正在用核心动画制作一些动画,但是我找不到一种方法来知道动画块何时完成,比如在UIVIew动画块中

setAnimationDidStopSelector:

在核心动画中我如何知道这一点,感谢您的帮助如果您使用的是
CAAnimation
实例,请查看其代理的
animationDidStop:finished:

CAAnimation * animation = [CAAnimation animation];
animation.delegate = yourDelegate; // could be self, for example.
[yourLayer setAnimation:animation forKey:nil];

在上面的示例中,
yourDelegate
应该实现
animationDidStop:finished:
方法,以便能够检测动画结束。

如果是CATTransition,是否会有任何区别?我似乎无法获得动画停止:完成:被调用。