ObservedObject
@propertyWrapper
public class ObservedObject<ObjectType> where ObjectType : ObservableObject
Used to observe an ObservableObject
when changes to its
Published
properties occur.
-
A wrapper of the underlying
See moreObservableObject
that can createBinding
s to its properties using dynamic member lookup.Declaration
Swift
@dynamicMemberLookup public struct Wrapper
-
Declaration
Swift
public init(wrappedValue value: ObjectType)
-
The internal value of this wrapper type.
Declaration
Swift
public var wrappedValue: ObjectType { get set }
-
The direct value of this wrapper, as accessing $foo on a @EnvironmentObject property.
Declaration
Swift
public var projectedValue: ObservedObject<ObjectType>.Wrapper { get }