Contents

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 for the toolbar item. You use this value to identify the item within your app, so you don’t need to localize it. For example, your toolbar delegate uses this value to identify the specific toolbar item.

  • barButtonItem:

    The bar button item to use to create the toolbar item.

Return Value

A new 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