To enable an object (such as a navigation controller) to drive a view controller transition, configure a custom class to adopt the
UIViewControllerInteractiveTransitioning protocol. An object that supports this protocol is called an interactive transition delegate.
- iOS 7.0+
- tvOS 9.0+
An interactive transition delegate can respond to touch events, or to time-varying programmatic input, by speeding up, slowing down, or even reversing the progress of a view controller transition. For example, an interactive transition on a navigation controller could respond to a swipe gesture by moving a view controller onto or off of the navigation stack.
To support an interactive view controller transition, you must also provide a transition animator delegate, which is a custom object that adopts the
UIViewControllerAnimatedTransitioning protocol. The transition delegate and the transition animator can, if you wish, be defined within a single custom class, but the class must adopt both protocols.
If you instead want to provide a fixed-duration animated view controller transition—one that does not support user interaction—use a transition animator delegate on its own. Refer to