Ray Wenderlich Functions and Types Course - Part 8
Just a little entry to try and maintain some momentum! Going to the next section now. Let's go! Start Time - 20:47 Properties and Methods This is the new chapter! Stored Properties I remember these from before. This is where you have variables/constants within a type and have the values set or they are entered on init. Property Observers Only useful for variable properties. These are only accessible when changing a value but not on init. struct Wizard { var firstName : String { willSet { print ( " \( firstName ) will be set to \(newValue) " ) } didSet { if firstName . contains ( " " ) { print ( "No spaces! \( firstName ) is not a first name. You need to change to \(oldValue) " ) ...