Skip to content

anod/iOSTransitionAnimation

Repository files navigation

ViewTransitionSequence

Wrapper on top of UIView transition to animate sequence of views

Example of usage

import ViewTransitionSequence


self.sequence = ViewTransitionSequence(
    container: self.container, // container view
    frameView: AnimationFrameView(), // frame view factory 
    frames: [ 
       FrameData(pic: UIImage(named: "face-1")!, title: "Best beard"),
       FrameData(pic: UIImage(named: "face-2")!, title: "Weird glass")
    ])
self.sequence.start() { finished in
    print("Sequence finished \(finished)")
}

Result

Sample

Options

public protocol TransitionSequneceOptions {
    // Options to pass to UIView.transition, default [ .transitionCurlUp ]
    var transition: UIViewAnimationOptions { get set }
    // Default 1.0
    var frameDuration: TimeInterval { get set }
}

Installation

Carthage

github "anod/iOSTransitionAnimation" >= 0.1