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 ObservableObject that can create Bindings to its properties using dynamic member lookup.

    See more

    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 }