Instance Property

childViewControllers

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

Declaration

@property(copy) NSArray<__kindof NSViewController *> *childViewControllers;

Discussion

You can add or remove child view controllers by using this property. When you do, the addChildViewController: or removeFromParentViewController method gets called accordingly.

See Also

Managing Child View Controllers in a Custom Container

- addChildViewController:

A convenience method for adding a child view controller at the end of the childViewControllers array.

- transitionFromViewController:toViewController:options:completionHandler:

Performs a transition between two sibling child view controllers of the view controller.

- insertChildViewController:atIndex:

Inserts a specified child view controller into the childViewControllers array at a specified position.

- removeChildViewControllerAtIndex:

Removes a specified child controller from the view controller.

- removeFromParentViewController

Removes the called view controller from its parent view controller.

- preferredContentSizeDidChangeForViewController:

Called when there is a change in value of the preferredContentSize property of a child view controller or a presented view controller.