一丶源碼
#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
二丶問題及實例
三丶其他:
翻譯有問題,留言告訴我下,謝謝;
以及有使用問題也可以留言,一起探討探討;