Coding at Home: May 7th, Classes and Cameras, Part 2

Code with us at 1pm, Irish time today!

Swift Student Challenge

First off, the big news yesterday was the announcement of the World-Wide Developer Conference’s dates and the Swift Student Challenge. These are Apple’s big developer events of the year, and the student challenge is a great way to show off your work.

If you’re stuck on your idea or want advice on how best to get going, feel free to drop us a note on the discussion board or at [email protected]!

Classes

Yesterday we took a brief tour through classes, which are yet another way for us to organize our code.

We started off building our own class hierarchy, and we’re going to discuss that again today. It’s an important concept, used throughout the Apple frameworks, so we’ll spend the first half or so of our session going over this concept, and then the rest going back to our MyCamera class to start customizing the look and feel of our camera.

Classes, like Types, are just a blueprint to structure our code. In our Animal case, the Animal class defines certain properties and behaviors all animals will have.

We can then create instances of that blueprint to use in our application. Our blueprints can inherit certain properties from other blueprints, so we could easily make a Dog blueprint by taking advantage of all the work we already did for the Animal blueprint.

We’ll walk through this and more today on the live session!

See you at 1pm!

Leave a Reply

Your email address will not be published. Required fields are marked *