How to take action when a property changes – Swift for Complete Beginners

preview_player
Показать описание
Other videos in the Structs section:

3. How to take action when a property changes: This video

Рекомендации по теме
Комментарии
Автор

Some time when try the exercise, want to check the related material. If the exercise include the link for related material, that may help.
again, I like this version.

tontonchan
Автор

what is the difference between set-get and willSet-didSet?

hossamfarfour
Автор

Is there a way in a “willSet” property observer to prevent the assignment/change from occurring? (i.e. “the code tries to assign an illegal value, I’d like to prevent that”?)

williamsquires