Contents

insertViewController(_:at:animated:)

Inserts a view controllers view at a specific index, and sets up containment for the view controller.

Declaration

func insertViewController(_ viewController: UIViewController, at index: Int, animated: Bool)

Parameters

  • viewController:

    The view controller with the view that you insert. If the view controller is the child of a container view controller, the list view controller removes it from that container before it inserts the view controller.

  • index:

    The index at which to insert the viewController’s view. This value must not be greater than the number of views in the OCKListViewController. If the index is out of bounds, this method throws an 1416220 Internalinconsistencyexception exception.

  • animated:

    A Boolean value that indicates whether to animate the insertion of the view controller.

See Also

Inserting in the list