A set of methods that provide contextual information for transition animations between view controllers.
- iOS 7.0+
- tvOS 9.0+
Do not adopt this protocol in your own classes, nor should you directly create objects that adopt this protocol. During a transition, the animator objects involved in that transition receive a fully configured context object from UIKit. Custom animator objects—objects that adopt the
UIView protocol—should simply retrieve the information they need from the provided object.
A context object encapsulates information about the views and view controllers involved in the transition. It also contains details about the how to execute the transition. For interactive transitions, the interactive animator object uses the methods of this protocol to report the animation’s progress. When the animation starts, the interactive animator object must save a pointer to the context object. Based on user interactions, the animator object then calls the
cancel methods to report the progress toward completing the animation. Those methods send that information to UIKit so that it can drive the timing of the animations.