Instance Method

overrideTraitCollectionForChildViewController:

Retrieves the trait collection for a child view controller.

Declaration

- (UITraitCollection *)overrideTraitCollectionForChildViewController:(UIViewController *)childViewController;

Parameters

childViewController

The view controller who’s trait collection is to be returned.

Return Value

The trait collection for the designated view controller.

Discussion

Use this method to retrieve the trait collection for a child view controller. You can then modify the trait collection for the designated child view controller and set it using the setOverrideTraitCollection:forChildViewController: method.

See Also

Managing Child View Controllers in a Custom Container

childViewControllers

An array of view controllers that are children of the current view controller.

- addChildViewController:

Adds the specified view controller as a child of the current view controller.

- removeFromParentViewController

Removes the view controller from its parent.

- transitionFromViewController:toViewController:duration:options:animations:completion:

Transitions between two of the view controller'€™s child view controllers.

shouldAutomaticallyForwardAppearanceMethods

Returns a Boolean value indicating whether appearance methods are forwarded to child view controllers.

- beginAppearanceTransition:animated:

Tells a child controller its appearance is about to change.

- endAppearanceTransition

Tells a child controller its appearance has changed.

- setOverrideTraitCollection:forChildViewController:

Changes the traits assigned to the specified child view controller.

UIViewControllerHierarchyInconsistencyException

Raised if the view controller hierarchy is inconsistent with the view hierarchy.

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