I'm playing around with SwiftUI and I have a class that looks something like this:
class Foo: ObservableObject {
@Published var foo: Int! { // Implicit unwrapped optional
didSet {
print("foo")
}
}
init() {
self.foo = 1
}
}
The didSet is always called. According to Apple docs it should not be called. Is there something special going on with the @Published
property wrapper?