Protocol

UINavigationControllerDelegate

Use a navigation controller delegate (a custom object that implements this protocol) to modify behavior when a view controller is pushed or popped from the navigation stack of a UINavigationController object.

Declaration

protocol UINavigationControllerDelegate

Overview

Topics

Responding to a View Controller Being Shown

func navigationController(UINavigationController, willShow: UIViewController, animated: Bool)

Called just before the navigation controller displays a view controller’s view and navigation item properties.

func navigationController(UINavigationController, didShow: UIViewController, animated: Bool)

Called just after the navigation controller displays a view controller’s view and navigation item properties.

Supporting Custom Transition Animations

func navigationController(UINavigationController, interactionControllerFor: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning?

Called to allow the delegate to return an interactive animator object for use during view controller transitions.

func navigationControllerPreferredInterfaceOrientationForPresentation(UINavigationController) -> UIInterfaceOrientation

Returns the preferred orientation for presentation of the navigation controller, as determined by the delegate.

func navigationControllerSupportedInterfaceOrientations(UINavigationController) -> UIInterfaceOrientationMask

Returns the complete set of supported interface orientations for the navigation controller, as determined by the delegate.

Constants

enum UINavigationController.Operation

These constants define the type of navigation controller transitions that can occur.

Relationships

Inherits From

See Also

Customizing the Navigation Interface Behavior

var delegate: UINavigationControllerDelegate?

The delegate of the navigation controller object.