Instance Method

removeFromParentViewController

Removes the called view controller from its parent view controller.

Declaration

- (void)removeFromParentViewController;

Discussion

Use this method to remove a child view controller from its parent view controller, unless you want to perform work during the removal. In that case, instead override the removeChildViewControllerAtIndex: method to perform that work and call that method.

This is a convenience method that calls the removeChildViewControllerAtIndex: method, automatically supplying the appropriate index value as an argument.

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.

- removeChildViewControllerAtIndex:

Removes a specified child controller from the 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.