Protocol

PreferenceKey

A named value produced by a view.

Declaration

protocol PreferenceKey

Overview

A view with multiple children automatically combines its values for a given preference into a single value visible to its ancestors.

Topics

Associated Types

associatedtype Value

The type of value produced by this preference.

Required.

Type Properties

static var defaultValue: Self.Value

The default value of the preference.

Required. Default implementation provided.

Type Methods

static func reduce(value: inout Self.Value, nextValue: () -> Self.Value)

Combines a sequence of values by modifying the previously-accumulated value with the result of a closure that provides the next value.

Required.

Relationships

Conforming Types

See Also

Preferences

struct LocalizedStringKey

The key used to look up a string in a strings file or strings dictionary file.

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