Instance Property


A Boolean value that indicates whether this view controller's view is covered when the view controller or one of its descendants presents a view controller.


@property(nonatomic, assign) BOOL definesPresentationContext;


When using the UIModalPresentationCurrentContext or UIModalPresentationOverCurrentContext style to present a view controller, this property controls which existing view controller in your view controller hierarchy is actually covered by the new content. When a context-based presentation occurs, UIKit starts at the presenting view controller and walks up the view controller hierarchy. If it finds a view controller whose value for this property is YES, it asks that view controller to present the new view controller. If no view controller defines the presentation context, UIKit asks the window’s root view controller to handle the presentation.

The default value for this property is NO. Some system-provided view controllers, such as UINavigationController, change the default value to YES.

See Also

Presenting a View Controller

- showViewController:sender:

Presents a view controller in a primary context.

- showDetailViewController:sender:

Presents a view controller in a secondary (or detail)€ context.

- presentViewController:animated:completion:

Presents a view controller modally.

- dismissViewControllerAnimated:completion:

Dismisses the view controller that was presented modally by the view controller.


The presentation style for modally presented view controllers.


Modal presentation styles available when presenting view controllers.


The transition style to use when presenting the view controller.


Transition styles available when presenting view controllers.


A Boolean value indicating whether the view controller enforces a modal behavior.


A Boolean value that indicates whether the view controller specifies the transition style for view controllers it presents.


Returns a Boolean indicating whether the current input view is dismissed automatically when changing controls.


Posted when a split view controller is expanded or collapsed.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software