From the course: Swift: Delegations and Data Sources
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
What is a class?
- [Instructor] Delegates make a lot more sense if you have some basic theory. If you already know everything you want to ever know about classes and view controllers, then you can skip this chapter, but you might learn something along the way. While we use classes in object-oriented programming, it's good to review what they actually are. A class is a collection of data, which we call properties and actions we can do to those properties, which we call methods. In Xcode, open up a new Swift playground. And you can pick a blank playground for iOS and hit Next. And I'm going to save it on the Desktop for the moment. At the bottom, you'll see the Run button. Hold it down and select Manually Run so that we don't have to worry about this giving us lots of error messages while we're working. And go ahead and delete everything there. And go ahead and add the libraries we'll need for this. The first one will be import UIKit. Second one will be import PlaygroundSupport. Under that, I'm going to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.