All right. 1
So first things first, go ahead and download the skeleton project called in InspoQuotes for this module 2
from the giant course resources list. 3
And once you've either git cloned or unzipped, then you should see this Xcode project. 4
Now, if you want to create the stub by yourself, then that's perfectly fine as well. 5
Just go ahead and create all of the features that we're going to talk about now. 6
So firstly, I've got a table view controller that is linked to a class called Quote TableViewController.swift. 7
That's that one there. 8
And this contains prototype cells that are named QuoteCell, 9
and it's also got a right bar button item that's called Restore. 10
And this is linked to my QuoteTableViewController.swift file with an IBAction called restorePressed 11
so that we can detect when that button gets pressed. 12
Now, this entire table view controller is then embedded in a navigation controller, 13
and this is our entrance point, 14
and this is the only screen that we currently have for this app. 15
Now, if you head over to the TableViewController.swift file, you can see that the class is called 16
QuoteTableViewController and it's all of our UITableViewController class, 17
and I've got one variable here called quotesToShow that contains six quotes which we're going to give 18
the use of for free, 19
and then I've got a constant code premiumQuotes which contains a further six quotes that we're going 20
to expose to the user 21
once they've successfully paid for the in-app purchase. I will explain a little bit shortly why this one is a "var" 22
and this one's a "let." So don't worry too much about that for now. 23
Now, the rest of this file contains a whole bunch of code that you get for free whenever you create a 24
new table view control. 25
So remember that you can create a new object of anything by simply hitting command N, and then creating 26
a new Cocoa Touch Class, 27
and then we just change the subclass to UITableViewController, renamed it QuoteTableViewController, 28
and we get all of this slightly junky code for free. 29
Now, I'm going to be deleting most of it, but I just wanted to show you this is what it looks like when 30
you create a new table view control from scratch. 31
And finally, at the bottom, we've got the IBAction that's linked to the restoreButton, so that we can 32
detect when it gets pressed, and that's all that I've done in the skeleton project. 33
So if you want to save time, then go ahead and use my skeleton project. if you want to do it from scratch, 34
then feel free to recreate everything that we've got here. And in the next lesson, we're going to get started 35
setting up our account on the Apple website. So see you there.