Properties
Stored properties Only provided by classed and structures. Computed properties Provide by classes, structures, enumerations. Usually associated with instance of a particular type, can be associated with the type itself(type properties). Can define property observers to monitor changes in a property’s value, which can respond to with custom action. Can use a property wrapper to reuse code in the getter and setter. Stored Properties **struct Setting { var width: Int let height: Int } var appSetting = Setting(width: 100, height: 200) appSetting.width = 150 let constSetting = Setting(width: 110, height: 210) //constSetting.width = 120 // This will trigger a compile-time error, the struct is of const value type.** Lazy Stored Properties Its initial value isn’t calculated until the first time it’s used. ...