开发者社区 问答 正文

CAKeyframeAnimation动画

CAKeyframeAnimation动画结束有没有回调方法, 我看了一下它里面的头文件,没找到,有知道的么,

展开
收起
a123456678 2016-07-27 16:30:51 1896 分享 版权
1 条回答
写回答
取消 提交回答
  • 有delegate。

    @interface NSObject (CAAnimationDelegate)
    
    /* Called when the animation begins its active duration. */
    
    - (void)animationDidStart:(CAAnimation *)anim;
    
    /* Called when the animation either completes its active duration or
     * is removed from the object it is attached to (i.e. the layer). 'flag'
     * is true if the animation reached the end of its active duration
     * without being removed. */
    
    - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag;
    
    @End
    2019-07-17 20:00:49
    赞同 展开评论
问答地址: