willSet didSet example swift – How to use ?

By | August 2, 2016

willSet didSet example swift

willSet and didSet are called property observers. They observe the changes in the value of a property. willSet observe what changes are made that means new value and didSet observe what change was made that is old value.


Leave a Reply

Your email address will not be published. Required fields are marked *