Link Search Menu Expand Document

ViewAnimating

An interface for implementing custom animator objects.

public protocol ViewAnimating 

Requirements

startAnimation()

Starts the animation from its current position.

func startAnimation()

startAnimation(afterDelay:​)

Starts the animation after the specified delay.

func startAnimation(afterDelay delay: TimeInterval)

pauseAnimation()

Pauses a running animation at its current position.

func pauseAnimation()

stopAnimation(_:​)

Stops the animations at their current positions.

func stopAnimation(_ withoutFinishing: Bool)

finishAnimation(at:​)

Finishes the animations and returns the animator to the inactive state.

func finishAnimation(at finalPositiong: ViewAnimatingPosition)

fractionComplete

The completion percentage of the animation.

var fractionComplete: Double 

isReversed

A boolean value indicating whether the animation is running in the reverse direction.

var isReversed: Bool 

state

The current state of the animation.

var state: ViewAnimatingState 

isRunning

A boolean value indicating whether the animation is currently running.

var isRunning: Bool