Instance Property

delegate

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

Declaration

weak var delegate: NSTouchBarDelegate? { get set }

Discussion

Employ a bar delegate, according to the needs of your app, to dynamically create items (NSTouchBarItem instances). For more information, see Using NSTouchBarItem Objects.

This property is conditionally archived, as described in the encodeConditionalObject(_:forKey:) method.

See Also

Providing Bar Items

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 defaultItemIdentifiers: [NSTouchBarItem.Identifier]

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

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.