Class

NSGroupTouchBarItem

A bar item that provides a bar to contain other items.

Declaration

class NSGroupTouchBarItem : NSTouchBarItem

Topics

Creating a Group

init(identifier: NSTouchBarItem.Identifier, items: [NSTouchBarItem])

Initializes and returns a group item whose bar is constructed from the supplied items.

init(identifier: NSTouchBarItem.Identifier, items: [NSTouchBarItem], allowedCompressionOptions: NSUserInterfaceCompressionOptions)

Initializes and returns a group item whose bar is constructed from the supplied items, and with the specified compression options.

init(alertStyleWithIdentifier: NSTouchBarItem.Identifier)

Initializes and returns a group item configured to match system alerts.

Configuring Groups

var groupTouchBar: NSTouchBar

A bar that holds this group's items.

var groupUserInterfaceLayoutDirection: NSUserInterfaceLayoutDirection

The user interface direction that controls the layout order of the items.

Configuring Item Width

var prefersEqualWidths: Bool

A Boolean value that specifies that items should have equal widths when possible.

var preferredItemWidth: CGFloat

The preferred width for items in the group when prefersEqualWidths is true.

Configuring Item Compression

var effectiveCompressionOptions: NSUserInterfaceCompressionOptions

The compression options that are currently active on the group.

var prioritizedCompressionOptions: [NSUserInterfaceCompressionOptions]

The allowed compression options, in the order they should be applied.

Configuring Bar Customization

var customizationLabel: String!

The user-visible string identifying this item during bar customization.

Relationships

Inherits From

Conforms To

See Also

Touch Bar Items

class NSTouchBarItem

A UI control shown in the Touch Bar on supported models of MacBook Pro.

class NSCandidateListTouchBarItem

A bar item that, along with its delegate, provides a list of textual suggestions for the current text view.

class NSColorPickerTouchBarItem

A bar item that provides a system-defined color picker.

class NSCustomTouchBarItem

A bar item that contains a responder of your choice, such as a view, a button, or a scrubber (an instance of the NSScrubber class).

class NSPopoverTouchBarItem

A bar item that provides a two-state control that can expand into its second state, showing the contents of a bar that it owns.

class NSSharingServicePickerTouchBarItem

A bar item that, along with its delegate, provides a list of objects eligible for sharing.

class NSSliderTouchBarItem

A bar item that provides a slider control for choosing a value in a range.

class NSUserInterfaceCompressionOptions

An object that specifies how user interface elements resize themselves when space is constrained.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software