Contents

setToolbarItems(_:animated:)

Sets the toolbar items to be displayed along with the view controller.

Declaration

func setToolbarItems(_ toolbarItems: [UIBarButtonItem]?, animated: Bool)

Parameters

  • toolbarItems:

    The toolbar items to display in a built-in toolbar.

  • animated:

    If True, animate the change of items in the toolbar.

Discussion

View controllers that are managed by a navigation controller can use this method to specify toolbar items for the navigation controller’s built-in toolbar. You can set the toolbar items for your view controller before your view controller is displayed or after it is already visible.

See Also

Configuring a navigation interface