转场动画相对来说比较简单,属性如下:
/* The name of the transition. Current legal transition types include
* `fade', `moveIn', `push' and `reveal'. Defaults to `fade'. */
//转场动画的名字,当前类型包括`fade', `moveIn', `push' and `reveal'四种。译为:交叉淡化过渡;新视图移到旧视图上面;新视图把旧视图推出去;将旧视图移开,显示下面的新视图
//在动画中间,我们可以加入颜色,形状,位置的变化等。
@property(copy) NSString *type;
//* An optional subtype for the transition. E.g. used to specify the
* transition direction for motion-based transitions, in which case
* the legal values are `fromLeft', `fromRight', `fromTop' and
* `fromBottom'. */
//主要是指明运动的方向。
@property(nullable, copy) NSString *subtype;
//startProgress和endProgress指动画过渡的开始和结束位置。
@property float startProgress;
@property float endProgress;
/* An optional filter object implementing the transition. When set the
* `type' and `subtype' properties are ignored. The filter must
* implement `inputImage', `inputTargetImage' and `inputTime' input
* keys, and the `outputImage' output key. Optionally it may support
* the `inputExtent' key, which will be set to a rectangle describing
* the region in which the transition should run. Defaults to nil. */
//即它实现了转场动画的自定义,设置了它之后,上边设置的type和subtype就无效了。
@property(nullable, strong) id filter;
注意:经过多次验证,转场动画不能与放在动画组中与其他动画一起使用。转场动画主要用于转场使用。