Instance Method

removeChildViewControllerAtIndex:

Removes a specified child controller from the view controller.

Declaration

- (void)removeChildViewControllerAtIndex:(NSInteger)index;

Parameters

index

The index in the childViewControllers array for the child view controller you want to remove.

Discussion

Override this method if you want to perform work during the removal of a child view controller. If you do override this method, in your implementation call this method on super.

If you just want to remove a child view controller, instead use use the removeFromParentViewController method

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.

childViewControllers

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

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

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