码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-07-25 22:56:04      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/duelsol/p/4676709.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!