Structure

EnvironmentValues

A collection of environment values.

Declaration

struct EnvironmentValues

Topics

Initializers

Instance Properties

var accessibilityEnabled: Bool

A Boolean value that indicates whether the user has enabled an assistive technology.

var allowsTightening: Bool

A Boolean value that indicates whether inter-character spacing should tighten to fit the text into the available space.

var calendar: Calendar

The current calendar that views should use when handling dates.

var colorScheme: ColorScheme

The color scheme of this environment.

var colorSchemeContrast: ColorSchemeContrast

The contrast associated with the color scheme of this environment.

var defaultMinListHeaderHeight: CGFloat?

The minimum height of a header in a list.

var defaultMinListRowHeight: CGFloat

The default minimum height of a row in a list.

var defaultWheelPickerItemHeight: CGFloat

The default height of an item in a wheel-style picker.

var displayScale: CGFloat

The display scale of this environment.

var font: Font?

The default font of this environment.

var horizontalSizeClass: UserInterfaceSizeClass?

The horizontal size class of this environment.

var imageScale: Image.Scale

The image scale for this environment.

var isEnabled: Bool

A Boolean value that indicates whether the view associated with this environment allows user interaction.

var lineLimit: Int?

The number of lines used to render text in the available space.

var locale: Locale

The current locale that views should use.

var minimumScaleFactor: CGFloat

The minimum permissible proportion to shrink the font size to fit the text into the available space.

var pixelLength: CGFloat

The size of a pixel on the screen.

var timeZone: TimeZone

The current time zone that views should use when handling dates.

var truncationMode: Text.TruncationMode

A value that indicates how the layout truncates the last line of text to fit into the available space.

var undoManager: UndoManager?

The undo manager that views should use to register undo operations.

var verticalSizeClass: UserInterfaceSizeClass?

The vertical size class of this environment.

Relationships

See Also

Environment Values

struct Environment

A dynamic view property that reads a value from the view’s environment.

Beta

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