Published
@propertyWrapper
public class Published<Value> : ChildWrapper
A type that publishes a property.
When the wrapped value of a published type changes, views that have
accessed to its parent ObservableObject through a @ObservedObject
property, will receive render updates.
Important
Published types should be used only inObservableObject classes.
-
Declaration
Swift
public init(wrappedValue value: Value) -
The internal value of this wrapper type.
Declaration
Swift
public var wrappedValue: Value { get set } -
The value as accessing $foo on a @Published property.
Declaration
Swift
public var projectedValue: Published<Value> { get }
View on GitHub
Published Class Reference