Instance Property

defaultItemIdentifiers

A required list of identifiers for the items (NSTouchBarItem instances) you want to appear when a bar is first instantiated.

Declaration

var defaultItemIdentifiers: [NSTouchBarItem.Identifier] { get set }

Discussion

Always specify this property for an NSTouchBar object, even if you elect to make the bar noncustomizable. The system:

  • Shows this list’s items by default when the system displays the bar.

  • Includes a preconfigured bar, containing these items, in the associated customization UI (when you have assigned the bar a customizationIdentifier property value); the user can drag the default bar into the Touch Bar, should they want to return to the default configuration.

The system archives this property.

See Also

Providing Bar Items

var delegate: NSTouchBarDelegate?

The delegate for the bar, used to provide the items for the touch bar.

var templateItems: Set<NSTouchBarItem>

The primary source of NSTouchBarItem instances used by the bar to fill its private items array, unless you provide items using a delegate.

var principalItemIdentifier: NSTouchBarItem.Identifier?

The item identifier for the NSTouchBarItem instance you want the system to center in the Touch Bar.

var escapeKeyReplacementItemIdentifier: NSTouchBarItem.Identifier?

The item identifier for the NSTouchBarItem instance that you are using as a replacement for the system escape button.