In Swift, does resetting the property inside didSet trigger another didSet?
问题 I'm testing this and it appears that if you change the value within didSet , you do not get another call to didSet . var x: Int = 0 { didSet { if x == 9 { x = 10 } } } Can I rely on this? Is it documented somewhere? I don't see it in the Swift Programming Language document. 回答1: I also thought, that this is not possible (maybe it wasn't in Swift 2), but I tested it and found an example where Apple uses this. (At "Querying and Setting Type Properties") struct AudioChannel { static let