Protocol

BindableObject

An object that serves as a view’s model.

Declaration

protocol BindableObject : AnyObject, DynamicViewProperty, Identifiable, _BindableObjectViewProperty

Topics

Associated Types

associatedtype PublisherType

The type of publisher exposed by this object.

Required.

Instance Properties

Subscripts

subscript<T>(ReferenceWritableKeyPath<Self, T>) -> Binding<T>

Creates a binding to a property identified by a key path.

Relationships

See Also

Data-Dependent Views

protocol DynamicViewProperty

A stored variable that updates an external property of a view.

Beta
struct State

A persistent value of a given type, through which a view reads and monitors the value.

Beta
struct ObjectBinding

A dynamic view property that subscribes to a bindable object automatically, invalidating the view when it changes.

Beta
struct EnvironmentObject

A dynamic view property that uses a bindable object supplied by an ancestor view to invalidate the current view whenever the bindable object changes.

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