Reputation: 211
Is there way to add a property observer in Lua just like Swift does for WillSet and DidSet with properties?
For example, I have a object of display.newText and whenever I change it's text property. I need to do something other as well? Like object.text = "Changed"
I know I can add a method like setText() or something but I'm looking for property observers in Lua language.
Thanks in advance.
Upvotes: 1
Views: 314