Posts

Showing posts with the label SuperClass

Chris Ching Course Part 2 (Classes, Inheritance, UIKit, Initialization, Optionals)

This Chris Ching course is different for many reasons - it's not practical in terms of projects; it really is just a refresher/consolidation for me at this stage. It's reassuring that what I know is at a deeper than level than what he is explaining. This makes sense as the course is for beginners! It's also interesting how much shorter it is; I'm 43% through already! Anyway, I'm going to crack on today with classes, then it will be a whole mixture of other bits. Let's go! Time started: 13:14 Classes So here are some values: var blogTitle = "Josh's Swift Journey" var blogBody = "Swift information" var author = "Josh Gonet" var posts = 5 The point with this is that it's difficult to do much with, especially if you want to make new versions etc.  Using the class keyword...I know all this so am not going to type much more! class BlogInfo { var blogTitle = "Josh's Swift Journey"...

What I know about Swift - Part Three

This is likely to be the last post about my understanding of Swift - at this point in my journey. After this, thoughts and reflections will be "live", in the sense that they will be specifically about what I have just discovered, am trying to make clearer to me, or feel compelled to share. As before, I am not claiming that ANY of this information is technically correct or accurate; it is what I understand about Swift, at present! Enumerations and Switch I've lumped these together on the premise that Switch statements can be used within Enumerations; both use cases so there is a link there. Switch could actually have been part of the Conditionals - if/else etc. var score = 54 var comment: String = "" switch score {      case 0 ... 20 :     comment = "Good score!"      case 21 ... 50 :     comment = "Great score!"      case 50...100 :     comment = "Excellent score!" ...