navigationController(_:interactionControllerFor:)
Allows the delegate to return an interactive animator object for use during view controller transitions.
Declaration
optional func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: any UIViewControllerAnimatedTransitioning) -> (any UIViewControllerInteractiveTransitioning)?Parameters
- navigationController:
The navigation controller whose navigation stack is changing.
- animationController:
The noninteractive animator object provided by the delegate’s Navigationcontroller(_:animationcontrollerfor:from:to:) method.
Return Value
The animator object responsible for managing the transition animations, or nil if you want to use the standard navigation controller transitions. The object you return must conform to the UIViewControllerInteractiveTransitioning protocol.
Discussion
Implement this delegate method when you want to provide a custom, interactive transition between view controllers as they are added to or removed from the navigation stack. The object you return should configure the interactivity aspects of the transition and should work with the object in the animationController parameter to start the animations.