Instance Method


Sent to discover the allowed item identifiers for a toolbar.


optional func toolbarAllowedItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier]



The toolbar whose allowed item identifiers are to be returned.

Return Value

An array of toolbar item identifiers for toolbar, specifying the contents and the order of the items in the configuration palette.


Every allowed item must be explicitly listed, even the standard ones. The identifiers returned should include all of those returned by toolbarDefaultItemIdentifiers(_:).

See Also

Configuring a Toolbar

func toolbar(NSToolbar, itemForItemIdentifier: NSToolbarItem.Identifier, willBeInsertedIntoToolbar: Bool) -> NSToolbarItem?

Sent to request a new toolbar item; returns a toolbar item of the identified kind for the specified toolbar.

func toolbarDefaultItemIdentifiers(NSToolbar) -> [NSToolbarItem.Identifier]

Sent to discover the default item identifiers for a toolbar.

func toolbarSelectableItemIdentifiers(NSToolbar) -> [NSToolbarItem.Identifier]

Sent to discover the selectable item identifiers for a toolbar.