Contents

toolbarSelectableItemIdentifiers(_:)

Asks the delegate to provide the set of selectable items in the toolbar.

Declaration

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

Parameters

  • toolbar:

    The toolbar that contains the items.

Return Value

An array of item identifiers, each of which corresponds to an NSToolbarItem that should display a selection indicator in the specified toolbar.

Discussion

Use this method to return the complete list of toolbar items that support selection. When someone selects one of the returned items, the toolbar automatically displays that item with a visual highlight. The toolbar also places the currently selected item in its selectedItemIdentifier property.

See Also

Configuring the behavior of items