Computed Properties (Getters & Setters) - Swift 5

Опубликовано: 16 Апрель 2019
на канале: Michael Miles
5,996
137

In this video, I go over the 2 types of computed properties, getters and setters. Here's a little definition of them:
Getters - “get”
used to initialize variables when called; must use “return” to set value

Setters - “set”
applied when a variable is modified; use term “newValue” when describing the value inside the brackets

Download the source code (with added notes) here - https://github.com/mgm720/ComputedPro...

Check out my podcast, Swift Life, on your favorite platform! https://anchor.fm/michael-miles04

Twitter:   / milesoftweets  

Instagram:   / michaelmilestv