Posts

Post not yet marked as solved
2 Replies
693 Views
If you add the @Published to an array property, the willSet no longer fires. Remove the @Published and it works again.This worked in XCode 11.3.1. Can someone confirm the same behaviour? Is this not going to be supported in future versions?Test classpublic class FooWillSet{ @Published var keys = ["front", "back"] { willSet { print("new values\(newValue)") print("old keys \(keys)") } }}func TestArray() { var foo = FooWillSet() foo.keys.append( "garage" ) foo.keys.append( "condo" ) }
Posted
by PyrixGreg.
Last updated
.