0 1 00:00:00,450 --> 00:00:00,900 All right. 1 2 00:00:00,900 --> 00:00:07,080 So first things first, go ahead and download the skeleton project called in InspoQuotes for this module 2 3 00:00:07,110 --> 00:00:10,460 from the giant course resources list. 3 4 00:00:10,740 --> 00:00:17,370 And once you've either git cloned or unzipped, then you should see this Xcode project. 4 5 00:00:17,370 --> 00:00:21,010 Now, if you want to create the stub by yourself, then that's perfectly fine as well. 5 6 00:00:21,090 --> 00:00:24,790 Just go ahead and create all of the features that we're going to talk about now. 6 7 00:00:24,810 --> 00:00:31,740 So firstly, I've got a table view controller that is linked to a class called Quote TableViewController.swift. 7 8 00:00:31,740 --> 00:00:33,430 That's that one there. 8 9 00:00:33,700 --> 00:00:38,080 And this contains prototype cells that are named QuoteCell, 9 10 00:00:38,640 --> 00:00:43,020 and it's also got a right bar button item that's called Restore. 10 11 00:00:43,190 --> 00:00:50,120 And this is linked to my QuoteTableViewController.swift file with an IBAction called restorePressed 11 12 00:00:50,130 --> 00:00:53,880 so that we can detect when that button gets pressed. 12 13 00:00:53,880 --> 00:00:59,700 Now, this entire table view controller is then embedded in a navigation controller, 13 14 00:00:59,700 --> 00:01:01,980 and this is our entrance point, 14 15 00:01:02,220 --> 00:01:06,240 and this is the only screen that we currently have for this app. 15 16 00:01:06,240 --> 00:01:11,910 Now, if you head over to the TableViewController.swift file, you can see that the class is called 16 17 00:01:11,910 --> 00:01:16,210 QuoteTableViewController and it's all of our UITableViewController class, 17 18 00:01:16,320 --> 00:01:22,500 and I've got one variable here called quotesToShow that contains six quotes which we're going to give 18 19 00:01:22,500 --> 00:01:23,890 the use of for free, 19 20 00:01:23,890 --> 00:01:29,970 and then I've got a constant code premiumQuotes which contains a further six quotes that we're going 20 21 00:01:29,970 --> 00:01:31,770 to expose to the user 21 22 00:01:32,010 --> 00:01:37,920 once they've successfully paid for the in-app purchase. I will explain a little bit shortly why this one is a "var" 22 23 00:01:37,950 --> 00:01:41,210 and this one's a "let." So don't worry too much about that for now. 23 24 00:01:41,220 --> 00:01:46,320 Now, the rest of this file contains a whole bunch of code that you get for free whenever you create a 24 25 00:01:46,320 --> 00:01:48,370 new table view control. 25 26 00:01:48,510 --> 00:01:55,500 So remember that you can create a new object of anything by simply hitting command N, and then creating 26 27 00:01:55,500 --> 00:01:57,180 a new Cocoa Touch Class, 27 28 00:01:57,240 --> 00:02:03,000 and then we just change the subclass to UITableViewController, renamed it QuoteTableViewController, 28 29 00:02:03,450 --> 00:02:07,930 and we get all of this slightly junky code for free. 29 30 00:02:08,130 --> 00:02:13,470 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 31 00:02:13,470 --> 00:02:16,920 you create a new table view control from scratch. 31 32 00:02:17,160 --> 00:02:22,320 And finally, at the bottom, we've got the IBAction that's linked to the restoreButton, so that we can 32 33 00:02:22,320 --> 00:02:26,850 detect when it gets pressed, and that's all that I've done in the skeleton project. 33 34 00:02:26,910 --> 00:02:32,580 So if you want to save time, then go ahead and use my skeleton project. if you want to do it from scratch, 34 35 00:02:32,610 --> 00:02:39,030 then feel free to recreate everything that we've got here. And in the next lesson, we're going to get started 35 36 00:02:39,090 --> 00:02:43,790 setting up our account on the Apple website. So see you there.