Model支撑:(依附对象)

从presentLayer获取数据;

渲染树为私有;

 

-(void)addAnimation:(CAAnimation *)anim forKey:(NSString *)key

key:动画帧的关联要素;

 

timingFunction:控制动画运行的节奏;

duration:动画的持续时间;

 

delegate:动画代理,用来监听动画的执行过程;

主要用于自定义动画;

 

CAMediaTiming:动画的暂停、继续控制

 

@interface CALayer : NSObject <NSCoding, CAMediaTiming>

 

@protocol CAMediaTiming

 

/* The begin time of the object, in relation to its parent object, if

 * applicable. Defaults to 0. */

 

@property CFTimeInterval beginTime;

 

/* The basic duration of the object. Defaults to 0. */

 

@property CFTimeInterval duration;

 

/* The rate of the layer. Used to scale parent time to local time, e.g.

 * if rate is 2, local time progresses twice as fast as parent time.

 * Defaults to 1. */

 

@property float speed;

 

/* Additional offset in active local time. i.e. to convert from parent

 * time tp to active local time t: t = (tp - begin) * speed + offset.

 * One use of this is to "pause" a layer by setting `speed' to zero and

 * `offset' to a suitable value. Defaults to 0. */

 

@property CFTimeInterval timeOffset;

------------------越是喧嚣的世界,越需要宁静的思考------------------ 合抱之木,生于毫末;九层之台,起于垒土;千里之行,始于足下。 积土成山,风雨兴焉;积水成渊,蛟龙生焉;积善成德,而神明自得,圣心备焉。故不积跬步,无以至千里;不积小流,无以成江海。骐骥一跃,不能十步;驽马十驾,功在不舍。锲而舍之,朽木不折;锲而不舍,金石可镂。蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇鳝之穴无可寄托者,用心躁也。