IFTTT开源Swift编写的帧动画框架--RazzleDazzle

mf7x 9年前

IFTTT开源Swift编写的帧动画框架--RazzleDazzle

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支持的动画类型外,还可以使用自定义动画类型。

IFTTT开源Swift编写的帧动画框架--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.

https://github.com/IFTTT/RazzleDazzle