In this, the third in a series of looking at struct and class properties and methods, we are going to take a look at property observers. Property observers observe and respond to changes in a property's value. They are called every time a property's value is set, even if the new value is the same as the property's current value. ... willSet is called just before the value is stored. didSet is called immediately after the new value is stored.
Starter Projects:
https://www.createchsol.com/StarterProjects/PropertyObserverStarterProjects.zip
Other videos in this series:
Computed properties, Getters and Setters
https://youtu.be/yze92fm54vU
Instance methods and Static properties
https://youtu.be/wezKMiPL4BM
Stewart Lynch's YouTube Playlist on iOS Development
https://www.youtube.com/playlist?list=PLBn01m5Vbs4C8jeAmLZxk9kZ59lYtxnHW
Stewart Lynch’s CreaTECH Solutions Web Site
https://www.createchsol.com
Stewart Lynch's GitHub
https://github.com/StewartLynch