Instance Property

childViewControllers

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

Declaration

@property(nonatomic, readonly) NSArray<__kindof UIViewController *> *childViewControllers;

Discussion

This property does not include any presented view controllers. This property is only intended to be read by an implementation of a custom container view controller.

See Also

Managing Child View Controllers in a Custom Container

- 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.

- overrideTraitCollectionForChildViewController:

Retrieves the trait collection for a child view controller.

UIViewControllerHierarchyInconsistencyException

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