Is there anyone who can help me with #SwiftUI #PropertyWrapper and #DynamicProperty it is not working as I expect it to work, https://forums.swift.org/t/dynamicproperty-propertywrapper-is-not-working-as-i-expect-it-to-work/78422 #swift #swiftlang
DynamicProperty PropertyWrapper is not working as I expect it to work
Hi All. I have a question why a Dynamic Property wrapper is not working as I expect it to work. If I do this with @AppStorage it works as expected, but with @iCloudStorage it does not work. Demo code with @AppStorage: class DataClass: ObservableObject { @AppStorage("dataSource") var dataSource: String = "DataSource" } struct ContentView: View { @ObservedObject var data = DataClass() var body: some View { VStack { Text(data.dataSource) // this does update...