Class

NSUserInterfaceCompressionOptions

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

Overview

An instance of NSUserInterfaceCompressionOptions contains zero or more options. Because a compression options object behaves like a set, you can use common operations like intersection, union and subtraction to interact with instances and their members.

You can access system-defined options through the class methods detailed in Creating Standard Options, or you can create your own custom options with the initWithIdentifier: initializer.

To compare two different compression options objects, use the methods described in the Comparing Compression Options section.

Topics

Creating a Compression Option

init

Creates a compression options object containing no options.

initWithCompressionOptions:

Creates an option object that represents the union of the supplied options.

initWithIdentifier:

Creates an option object with the given identifier string.

Creating Standard Options

hideImagesOption

An option specifying that views should hide their images.

hideTextOption

An option specifying that views should hide their text.

reduceMetricsOption

An option specifying that views should reduce their internal metrics.

breakEqualWidthsOption

An option specifying that views should no longer maintain equal width constraints.

standardOptions

An option that represents the union of all standard compression options.

Comparing Compression Options

empty

A Boolean value that denotes whether the option is empty.

containsOptions:

Determines whether the supplied compression options are all present in the current instance.

intersectsOptions:

Determines whether the supplied compression options intersect with the current instance's options.

Combining Compression Options

optionsByAddingOptions:

Creates a new compression options object representing the union with the provided options.

optionsByRemovingOptions:

Creates a new compression options object with the supplied options removed.

Relationships

Inherits From

Conforms To

See Also

Touch Bar Items

NSTouchBarItem

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

NSCandidateListTouchBarItem

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

NSColorPickerTouchBarItem

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

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).

NSGroupTouchBarItem

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

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.

NSSharingServicePickerTouchBarItem

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

NSSliderTouchBarItem

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