Contents

setLeftBarButton(_:animated:)

Sets the custom bar button item, optionally animating the transition to the new item.

Declaration

func setLeftBarButton(_ item: UIBarButtonItem?, animated: Bool)

Parameters

  • item:

    A custom bar item to display on the left side of the navigation bar.

  • animated:

    Specify True to animate the transition to the custom bar item when this item is the top item. Specify False to set the item 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