Instance Method

interactionControllerForPresentation(using:)

Asks your delegate for the interactive animator object to use when presenting a view controller.

Declaration

optional func interactionControllerForPresentation(using animator: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?

Parameters

animator

The transition animator object returned by your animationController(forPresented:presenting:source:) method.

Return Value

The interactive animator object to use to manage the timing of the transition or nil if you do not want to support interactive transitions.

Discussion

Use this method to create and return an object that implements the methods of the UIViewControllerInteractiveTransitioning protocol. The implementation of that protocol should configure the event-handling code required to manage the appearance of the target view controller. You may return nil from this method if you do not want to the animations to be interactive.

For more information on implementing an interactive animator object, see UIViewControllerInteractiveTransitioning.

See Also

Getting the Interactive Animator Objects

func interactionControllerForDismissal(using: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?

Asks your delegate for the interactive animator object to use when dismissing a view controller.