Contents

toolbarImmovableItemIdentifiers(_:)

Asks the delegate to provide the items that people can’t remove from the toolbar or rearrange during the customization process.

Declaration

@MainActor optional func toolbarImmovableItemIdentifiers(_ toolbar: NSToolbar) -> Set<NSToolbarItem.Identifier>

Parameters

  • toolbar:

    The toolbar that contains the items.

Return Value

The set of item identifiers that people can’t remove from the toolbar or move to other locations in the toolbar. Return an empty set to let someone customize all toolbar items.

Discussion

Implement this method in your delegate and return any items you don’t want people to remove or rearrange. If you don’t implement this method, the toolbar lets people rearrange and remove all toolbar items.

See Also

Configuring the behavior of items