[轉]IFTTT開源Swift編寫的幀動畫架構--RazzleDazzle

來源:互聯網
上載者:User

標籤:

RazzleDazzle 是IFTTT開源的一個iOS幀動畫架構,用Swift編寫,非常適用於APP初次使用時的介紹和引導資訊。RazzleDazzle由IFTTT此前開源的一款Objective-C滾動幀動畫庫JazzHands發展而來。JazzHands是UIKit一個簡單的主要畫面格基礎動畫架構,可通過手勢、scrollview、KVO或者ReactiveCocoa控制動畫,被IFTTT應用在IFTTT for iPhone上。多款知名應用程式都使用了JazzHands這個架構,目前其在github上有3688個star。對於RazzleDazzle,開發人員除了使用RazzleDazzle支援的動畫類型外,還可以使用自訂動畫類型。

RazzleDazzle支援的動畫類型:

  • AlphaAnimation animates the alpha property (creates fade effects).

  • BackgroundColorAnimation animates the backgroundColor property.

  • RotationAnimation animates a rotation transform (for rotation effects).

  • ScaleAnimation applies a scaling transform (to scale view sizes).

  • TranslationAnimation applies a translation transform (to translate view position).

  • CornerRadiusAnimation animates the layer.cornerRadius property.

  • HideAnimation animates the hidden property (hides and shows views).

  • LayerStrokeStartAnimation animates the strokeStart property of a CAShapeLayer (does not work with LayerStrokeEndAnimation).

  • LayerStrokeEndAnimation animates the strokeEnd property of a CAShapeLayer (does not work with LayerStrokeStartAnimation).

  • LayerFillColorAnimation animates the fillColor property of a CAShapeLayer.

  • LayerStrokeColorAnimation animates the strokeColor property of a CAShapeLayer.

  • PathPositionAnimation animates the layer.position property of a UIView along a path.

  • LabelTextColorAnimation animates the textColor property of a UILabel.

  • ConstraintConstantAnimation animates an AutoLayout constraint constant.

  • ConstraintMultiplierAnimation animates an AutoLayout constraint constant as a multiple of an attribute of another view (to offset or resize views based on another view‘s size)

  • ScrollViewPageConstraintAnimation animates an AutoLayout constraint constant to place a view on a scroll view page (to position views on a scrollView using AutoLayout). This is the animation doing the heavy lifting for AnimatedPagingScrollViewController‘s keepView(view: onPage:) function.

[轉]IFTTT開源Swift編寫的幀動畫架構--RazzleDazzle

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.