From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Setup for UIKit Drawing

Setup for UIKit Drawing

- [Instructor] I'm doing a short mini course on drawing in Core Graphics. Before we start doing any drawing, we're going to need a little bit of an environment to do that. Now, I'm going to do one in UIKit. This week, I'm going to show you how to make that environment in a playground, which is also a lot of the programmatic UIKit way of setting up any view controller. So let's go into this, and look at how this all puts together. First of all, I've got the import UIKit up top, here, and I have my class ViewController, which you can type this in yourself, or you can go to the exercise files and find it there, but we're just going to start with that. Now view controllers on a playground, like I have here, are going to need some extra little help. It does not create its own view, you have to force a view on it, and, so, that requires a method known as loadView. And, so, we can do a func loadView(){ and you can put that in…

Contents