CATransition

該類存放在CAAnimation.h文件中

Super Class

@interface CATransition : CAAnimation

Attribute

  • 轉場類型,默認類型為'fade'
  • 類型類型有:
轉場類型字符串 效果說明 關鍵字 方向
fade 交叉淡化過濾 YES
psh 新視圖把舊視圖推出去 YES
moveIn 新視圖移到舊視圖上面 YES
reveal 將舊視圖移開,顯示下面的新視圖 YES
cube 立方體翻滾效果
oglFilp 上下左右翻轉效果
suckEffect 收縮效果 NO
rippleEffect 水濾效果 NO
pageCurl 向上翻頁效果
pageUnCurl 向下翻頁效果
cameraIrisHollowOpen 相機鏡頭打開效果 NO
cameraIrisHollowClose 相機鏡頭關閉效果 NO
/* The name of the transition. Current legal transition types include
 * `fade', `moveIn', `push' and `reveal'. Defaults to `fade'. */
@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;
  • 轉場動畫開始位置,默認為0
  • 轉場動畫結束位置,默認為1
  • 值的范圍為[0,1],0點即控件左下角
/* The amount of progress through to the transition at which to begin
 * and end execution. Legal values are numbers in the range [0,1].
 * `endProgress' must be greater than or equal to `startProgress'.
 * Default values are 0 and 1 respectively. */
@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. */

@property(nullable, strong) id filter;

@end

最后編輯于
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內(nèi)容