ViewAnimationSequence

public class ViewAnimationSequence: Animation

A sequence of animations that run one after the other. This class ignores the duration property.

  • Initializes a set of animations to execute in sequence.

    let v = View(frame: Rect(0,0,100,100))
    canvas.add(v)
    let bg = ViewAnimation(duration: 0.25) {
        v.backgroundColor = C4Blue
    }
    let ctr = ViewAnimation(duration: 0.25) {
        v.center = self.canvas.center
    }
    let seq = ViewAnimationSequence(animations: [bg,ctr])
    delay(1.0) {
        seq.animate()
    }
    

    Declaration

    Swift

    public init(animations: [Animation])

    Parameters

    animations

    An array of C4Animations

  • Calling this method will tell the receiver to begin animating.

    Declaration

    Swift

    public override func animate()