Type Method

itemWithItemIdentifier:barButtonItem:

Creates a toolbar item with property values from the specified bar button item.

Declaration

+ (instancetype)itemWithItemIdentifier:(NSToolbarItemIdentifier)itemIdentifier barButtonItem:(UIBarButtonItem *)barButtonItem;

Parameters

itemIdentifier

The identifier of the toolbar item. Because users don't see the identifier, you don't need to localize it.

barButtonItem

The bar button item that this initializer uses to create and initialize a toolbar item.

Discussion

Use this method to create and initialize a toolbar item with property values from a UIBarButtonItem, such as title, image, action, and target.

See Also

Creating a Toolbar Item

- initWithItemIdentifier:

Initialize the receiver with a given identifier.