Returns the active transition coordinator object.
SDKs
- iOS 7.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
var transitionCoordinator: UIView Controller Transition Coordinator? { get }
Return Value
The transition coordinator object associated with a currently active transition or nil
if no transition is in progress.
Discussion
When a presentation or dismissal is in progress, this method returns the transition coordinator object associated with that transition. If there is no in-progress transition associated with the current view controller, UIKit checks the view controller’s ancestors for a transition coordinator object and returns that object if it exists. You can use this object to create additional animations and synchronize them with the transition animations.
Container view controllers can override this method but in most cases should not need to. If you do override this method, first call super
to see if there is an appropriate transition coordinator to return, and, if there is, return it.
For more information about the role of transition coordinators, see UIView
.