Contents

setRightBarButtonItems(_:animated:)

Sets the right bar button items, optionally animating the transition to the new items.

Declaration

func setRightBarButtonItems(_ items: [UIBarButtonItem]?, animated: Bool)

Parameters

  • items:

    An array of custom bar button items to display on the right side of the navigation bar.

  • animated:

    Specify True to animate the transition to the custom bar items when this item is the top item. Specify False to set the items immediately without animating the change.

Discussion

If two navigation items have the same custom left or right bar button items, those bar button items remain stationary during the transition when the navigation item is pushed or popped.

See Also

Specifying custom views