What is the purpose of willSet and didSet in Swift? Swift has a property declaration syntax very similar to C#’s: var foo: Int { get { return getFoo() } set { setFoo(newValue) } } However, it also has willSet... May 17, 2022 0 Comments