Sets the behavior of the user-customized view.
- macOS 10.15+
- Xcode 11.0+
One of the allowed
Bar Item Presence
Trait that describes the behavior for this Touch Bar view.
touch to define the visibility requirements of a particular Touch Bar view during customization by the user.
Touch Bar views may be:
.required: not allowed to be removed by the user.
.default: shown by default prior to user customization, but removable.
.optional: not visible by default, but can be added through the customization palette.
Touch must be initialized with a string that is a globally unique identifier for this item.
In the example below, all of the Touch Bar items are visible in the Touch Bar by default, except for the “Clubs” item. It’s set to
.optional but is configurable by the user: