Contents

viewController(forKey:)

Returns the view controllers involved in the transition.

Declaration

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

Parameters

Return Value

The view controller associated with the key.

Discussion

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

See Also

Getting the views and view controllers