I have been working with willSet and didSet for a variable for a while. Its used to get notified and perform some action before and after a variable is changed.
I recently came across KVO which does similar thing, but with few more steps to setup.
- Is there any difference between these two approaches?
- Does one have any advantage over the other?