@Published
SwiftUI โฉ view โฉ state โฉ observable object โฉ @Published
Use @Published
to declare a published value in an observable object type.
The @Published
attribute is class constrained. Use it with properties of classes, not with non-class types like structures.
@StateObject๏ผinitialize an observable object.
Last updated