Swift Tutorials: Property observers in swift

Published: 10 April 2020
on channel: Swift Tutorials
850
19

In this video tutorial, we will learn about property observers in swift. Property observers observe and respond to change in property's value.We have two types of property observers

1) willSet
2) didSet

willSet - is called just before the value is stored.
didSet - is called immediately after the new value is stored.

We will learn how to implement property observers with a small example.