Instance Method

viewController(forKey:)

Returns the view controllers involved in the transition.

Required.

Declaration

func viewController(forKey key: UITransitionContextViewControllerKey) -> UIViewController?

Parameters

key

The key indicating which view controller you want. For a list of possible values, see ”View Controller Transition Keys” constants in UIViewControllerContextTransitioning.

Return Value

The view controller associated with the key.

Discussion

The view controller associated with the from key corresponds to the view controller that is already onscreen. The view controller associated with the to key corresponds to the view controller that is to be animated onscreen.

See Also

Getting the Views and View Controllers

func view(forKey: UITransitionContextViewKey) -> UIView?

Returns the specified view involved in the transition.

Required.

var containerView: UIView

Returns the view in which the transition takes place.

Required.