Contents

toolbarDefaultItemIdentifiers(_:)

Asks the delegate to provide the default items to display on the toolbar.

Declaration

@MainActor optional func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier]

Parameters

  • toolbar:

    The toolbar whose default item identifiers are to be returned.

Return Value

An array of toolbar item identifiers, each of which represents an item that appears in the default toolbar. Arrange the identifiers in the order you want them to appear in the toolbar, with the first item appearing on the toolbar’s leading edge.

Discussion

The toolbar calls this method when user settings don’t contain any custom configuration data for the toolbar. The toolbar also calls it to initialize the customization palette’s contents.

See Also

Configuring the behavior of items