I need to execute a function when a variable value changes.
I have a singleton class containing a shared variable called labelChange. Values of this va
labelChange
var item = "initial value" { didSet { //called when item changes print("changed") } willSet { print("about to change") } } item = "p"