美文网首页
iOS_动画_POP_POPCustomAnimation.h

iOS_动画_POP_POPCustomAnimation.h

作者: 丶纳凉 | 来源:发表于2017-04-12 14:55 被阅读69次

    一丶源码

    
    #import <pop/POPAnimation.h>
    
    @class POPCustomAnimation;
    
    /**
     是自定义动画的回调块
    每个帧动画回调此block,最新的属性;
    target:动画对象,避免循环;
    animation:动画实例,确定上次回调来的当前时间,和已经使用的时间;避免循环使用;
    return no = 动画完成;
     */
    typedef BOOL (^POPCustomAnimationBlock)(id target, POPCustomAnimation *animation);
    
    /**
    自定义动画
     */
    @interface POPCustomAnimation : POPAnimation
    
    /**
    初始化,并返回一个动画实例
    */
    + (instancetype)animationWithBlock:(POPCustomAnimationBlock)block;
    
    /**
     当前动画的时间
     */
    @property (readonly, nonatomic) CFTimeInterval currentTime;
    
    /**
     上次回调的时间
     */
    @property (readonly, nonatomic) CFTimeInterval elapsedTime;
    
    @end
    
    

    二丶问题及实例

    三丶其他:

    翻译有问题,留言告诉我下,谢谢;
    以及有使用问题也可以留言,一起探讨探讨;

    相关文章

      网友评论

          本文标题:iOS_动画_POP_POPCustomAnimation.h

          本文链接:https://www.haomeiwen.com/subject/ycemattx.html