Initializer

init(itemIdentifier:barButtonItem:)

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

Declaration

convenience init(itemIdentifier: NSToolbarItem.Identifier, barButtonItem: UIBarButtonItem)

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

init(itemIdentifier: NSToolbarItem.Identifier)

Initialize the receiver with a given identifier.