
RazzleDazzle 是 IFTTT 開源的一款 iOS 幀動畫框架,採用 Swift 編寫,特別適合製作 App 首次啟動時的引導介紹頁。它由 IFTTT 此前開源的 Objective-C 滾動幀動畫庫 JazzHands 演進而來。JazzHands 本質上是 UIKit 上一套簡潔的關鍵幀基礎動畫框架,可透過手勢、scrollView、KVO 或 ReactiveCocoa 來驅動動畫,並已被 IFTTT 應用於自家 iPhone 客戶端。如今已有不少知名應用採用 JazzHands,其在 GitHub 上累計收穫了 3688 個 star。而在 RazzleDazzle 中,開發者除了使用框架內建的動畫類型外,還能自行擴充自定義的動畫效果。

RazzleDazzle 內建的動畫類型:
AlphaAnimation 動畫化 alpha 屬性(實現淡入淡出效果)。
BackgroundColorAnimation 動畫化 backgroundColor 屬性。
RotationAnimation 動畫化旋轉變換(用於旋轉效果)。
ScaleAnimation 施加縮放變換(用於調整視圖大小)。
TranslationAnimation 施加平移變換(用於移動視圖位置)。
CornerRadiusAnimation 動畫化 layer.cornerRadius 屬性。
HideAnimation 動畫化 hidden 屬性(實現視圖的顯示與隱藏)。
LayerStrokeStartAnimation 動畫化 CAShapeLayer 的 strokeStart 屬性(與 LayerStrokeEndAnimation 不能同時使用)。
LayerStrokeEndAnimation 動畫化 CAShapeLayer 的 strokeEnd 屬性(與 LayerStrokeStartAnimation 不能同時使用)。
LayerFillColorAnimation 動畫化 CAShapeLayer 的 fillColor 屬性。
LayerStrokeColorAnimation 動畫化 CAShapeLayer 的 strokeColor 屬性。
PathPositionAnimation 讓 UIView 的 layer.position 沿著路徑進行動畫。
LabelTextColorAnimation 動畫化 UILabel 的 textColor 屬性。
ConstraintConstantAnimation 動畫化 AutoLayout 約束的 constant。
ConstraintMultiplierAnimation 以另一視圖某屬性的倍數來動畫化 AutoLayout 約束的 constant(可依據其他視圖尺寸偏移或縮放)。
ScrollViewPageConstraintAnimation 動畫化 AutoLayout 約束的 constant,使視圖停留在 scrollView 的某一頁(用 AutoLayout 將視圖定位到 scrollView 頁面上)。這也是 AnimatedPagingScrollViewController 中 keepView(view: onPage:) 功能背後的核心動畫。