21 thoughts on “9. Basic building blocks of Swift programming”

  1. I’ll explain it to you with an example. Imagine Object-Oriented Programming as real life, where you’ve got your Car Class because you want to build many cars. A car can have a color, a model, a name, these are the properties. But a car can also accelerate and decelerate. These are your methods. Methods are functions (what it does), and properties are attributes (how it is).

  2. I also noticed a difference in the right column of the playground. In Xcode 8 I see:
    var firstPerson = Person() …displays… Person (not (Name “Initial Name”) as in the video)
    firstPerson.Name …displays… “Initial Name” as in the video

  3. Isn’t ‘println’ deprecated in Swift? When I try to use it in Xcode 8 I get an error icon in the left margin of the playground.

  4. When I type var b = Person() instead of it printing Person like it does on yours, it prints _lldb_expr_47.Person. Help?

  5. Chris, I keep getting an error message in Xcode that says “Error running playground. Unable to find suitable target device.” Any suggestions? Thank you!

  6. Hi Chris,

    Just thought I’d say that no-one has ever described and demonstrated classes to me so clearly and concisely. I think this time it has really sunk in.



Leave a Comment