本文主要介绍了如何暂停和继续CALayer的动画. 首先来看CALayer.
/** The base layer class. **/
@interface CALayer : NSObject <NSCoding, CAMediaTiming>
NSCoding比较常用, 就不多说了. 那这个CAMediaTiming是个什么东西!
CAMediaTiming
/* The CAMediaTiming protocol is implemented by layers and animations, it
* models a hierarchical timing system, with each object describing the
* mapping from time values in the object's parent to local time.
*
* Absolute time is defined as mach time converted to seconds. The
* CACurrentMediaTime function is provided as a convenience for querying the
* current absolute time.
*
* The conversion from parent time to local time has two stages:
*
* 1. conversion to "active local time". This includes the point at
* which the object appears in the parent's timeline, and how fast it
* plays r