Instance Method

setLeftBarButtonItem:animated:

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

Declaration

- (void)setLeftBarButtonItem:(UIBarButtonItem *)item animated:(BOOL)animated;

Parameters

item

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

animated

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

titleView

A custom view displayed in the center of the navigation bar when the receiver is the top item.

leftBarButtonItems

An array of custom bar button items to display on the left (or leading) side of the navigation bar when the receiver is the top navigation item.

leftBarButtonItem

A custom bar button item displayed on the left (or leading) edge of the navigation bar when the receiver is the top navigation item.

rightBarButtonItems

An array of custom bar button items to display on the right (or trailing) side of the navigation bar when the receiver is the top navigation item.

rightBarButtonItem

A custom bar button item displayed on the right (or trailing) edge of the navigation bar when the receiver is the top navigation item.

- setLeftBarButtonItems:animated:

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

- setRightBarButtonItems:animated:

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

- setRightBarButtonItem:animated:

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