I am new with SwiftUI and just ran into this problem this week. Unfortunately, @Observable is "only available in iOS 17.0 or newer" so I guess I need to find another way of doing this myself, as my target is for older versions of the OS. (My iPhone X won't run iOS 17 😩) I guess I need to learn just what @Observable does behind the scenes!
Does anybody know how it works with static properties of class? I have static property of @Observable class - gameIsActive (Bool) and would like to change states of different views depending of this common property. But I didn’t find how to do that.
Thank You @paul hudson🤩
I am new with SwiftUI and just ran into this problem this week. Unfortunately, @Observable is "only available in iOS 17.0 or newer" so I guess I need to find another way of doing this myself, as my target is for older versions of the OS. (My iPhone X won't run iOS 17 😩) I guess I need to learn just what @Observable does behind the scenes!
Does anybody know how it works with static properties of class? I have static property of @Observable class - gameIsActive (Bool) and would like to change states of different views depending of this common property. But I didn’t find how to do that.
Great explanation, every once in a while I hit that not updating view… 😅
Why can't you use @StateObject with class instead of @Obervable and @State?
Hi, is this an updated video? I remember this project. Thanks
Yes; all videos are getting an iOS 17 refresh.