Instance Property


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


var principalItemIdentifier: NSTouchBarItem.Identifier? { get set }


The system attempts to center a principal item within the Touch Bar. If you want a group of items to appear centered in the Touch Bar, designate the group item (of type NSGroupTouchBarItem) as the principal item.

If more than one bar in the responder chain is eligible to be visible in the Touch Bar, and more than one of those has a principal item, the system determines which one to center in the Touch Bar.

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

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

var escapeKeyReplacementItemIdentifier: NSTouchBarItem.Identifier?

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