InteractiveTransitionAnimation

open class InteractiveTransitionAnimation : NSObject, TransitionAnimation

InteractiveTransitionAnimation provides a simple interface to create interactive transition animations.

An InteractiveTransitionAnimation can be created by providing the duration, the animation code and (optionally) a closure to create an interaction controller.

  • See UIViewControllerAnimatedTransitioning for further information.

    Declaration

    Swift

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

    Parameters

    transitionContext

    The context of the transition.

    Return Value

    The transition duration as specified in the initializer.

  • See UIViewControllerAnimatedTransitioning for further information.

    Declaration

    Swift

    open func animateTransition(using transitionContext: UIViewControllerContextTransitioning)

    Parameters

    transitionContext

    The context of a transition for which the animation should be started.

  • This method is used to generate an applicable interaction controller.

    Note

    To allow for more complex logic to create a specific interaction controller, override this method in your subclass.

    Declaration

    Swift

    open func generateInteractionController() -> PercentDrivenInteractionController?
  • Starts the transition animation by generating an interaction controller.

    Declaration

    Swift

    open func start()
  • Ends the transition animation by deleting the interaction controller.

    Declaration

    Swift

    open func cleanup()