I have an ObservableObject that contains multiple published variables to handle my app state.
Whenever one of those published variables change, I want to call a function inside my ObservableObject. What's the best way to do that?
class AppModelController: ObservableObject {
@Published var a: String = "R"
@Published var b: CGFloat = 0.0
@Published var c: CGFloat = 0.9
// Call this function whenever a, b or c change
func check() -> Bool {
}
}