Generic Structure

TouchBar

A container for a view that you can show in the Touch Bar.

Declaration

struct TouchBar<Content> where Content : View

Topics

Creating a Touch Bar View

init(content: () -> Content)

Creates a non-customizable Touch Bar view.

init(id: String, content: () -> Content)

Creates a customizable Touch Bar view with a globally unique identifier.

See Also

Configuring Touch Bar Views

func touchBar<Content>(TouchBar<Content>) -> View

Sets the touch bar and its content to be shown in the Touch Bar when applicable.

func touchBarItemPrincipal(Bool) -> View

Sets the view as having special significance to the TouchBar.

func touchBarCustomizationLabel(Text) -> View

Sets a user-visible string identifying the view’s functionality.

func touchBarItemPresence(TouchBarItemPresence) -> View

Sets the behavior of the view when being customized by the user.