StaticTransitionAnimation

open class StaticTransitionAnimation : NSObject, TransitionAnimation

StaticTransitionAnimation can be used to realize static transition animations.

Note

Consider using InteractiveTransitionAnimation instead, if possible, as it is as simple to use. However, this class is helpful to make sure your transition animation is not mistaken to be interactive, if your animation code does not fulfill the requirements of an interactive transition animation.
  • Creates a StaticTransitionAnimation to be used as presentation or dismissal transition animation in an Animation object.

    Declaration

    Swift

    public init(duration: TimeInterval, performAnimation: @escaping (_ context: UIViewControllerContextTransitioning) -> Void)
  • See UIViewControllerAnimatedTransitioning for further information.

    Declaration

    Swift

    open func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval

    Parameters

    transitionContext

    The context of the current transition.

    Return Value

    The duration of the animation as specified in the initializer.

  • See UIViewControllerAnimatedTransitioning for further information.

    This method performs the animation as specified in the initializer.

    Declaration

    Swift

    open func animateTransition(using transitionContext: UIViewControllerContextTransitioning)

    Parameters

    transitionContext

    The context of the current transition.

  • Declaration

    Swift

    open func start()
  • Declaration

    Swift

    open func cleanup()