Hi all,
The WWDC video offers (at about 16:45) as short explanation as to why it's "objectWillChange" instead of "objectDidChange". He said it's because SwiftUI needs to coalesce the changes.
Okay, but then how does it know when the changes have ended?
It seems like you'd need two events. Something like:
or
The WWDC video offers (at about 16:45) as short explanation as to why it's "objectWillChange" instead of "objectDidChange". He said it's because SwiftUI needs to coalesce the changes.
Okay, but then how does it know when the changes have ended?
It seems like you'd need two events. Something like:
Code Block swift self.objectWillChange.send() self.foo = ... self.bar = ... self.objectHasFinishedChanging.send()
or
Code Block swift self.objectChanges { self.foo = ... self.bar = ... }