Posts

Showing posts with the label sub class

Ray Wenderlich Course Part 12 (up to lesson 110)

Here we go - the last of the 'theoretical' Ray sections of lessons before the next project. I'm not expecting to get all of this, after how tricky the last couple of sections have been. Again, I will type along where I can and keep it at normal speed.  Classes vs Structures So here is a simple structure (already typed out for me): struct PersonStruct {   var firstName: String   var lastName: String   var fullName: String {     return " \ ( firstName ) \ ( lastName )"   } } To make a class, it is simple enough. Same as above.  class P ersonClass {     var firstName: String     var lastName: String          var fullName: String {         return " \ ( firstName ) \ ( lastName )"     } } The difference of course is that inits are needed. I know all about this from before.  Ray mentions Heap vs Stack vi...