1 00:00:00,900 --> 00:00:05,710 Now that the screen is done, it's time to connect it up and you should know what to do at this point. 2 00:00:06,090 --> 00:00:08,280 So if we hit this little icon at the top, right. 3 00:00:08,910 --> 00:00:15,720 And then on one side, we select the view controller, but we haven't actually created the View controller 4 00:00:15,720 --> 00:00:15,990 yet. 5 00:00:15,990 --> 00:00:17,100 That brings up a good point. 6 00:00:17,490 --> 00:00:19,340 That's what happens when you do these things freestyle. 7 00:00:19,350 --> 00:00:22,260 So we're going to click add new file. 8 00:00:23,360 --> 00:00:26,080 Going to go, of course, with a swift file. 9 00:00:28,910 --> 00:00:32,210 And we are going to call this the off view controller. 10 00:00:36,160 --> 00:00:42,220 OK, and now we're actually let me just turn this sidebar off, we actually have to set this view controller 11 00:00:42,250 --> 00:00:43,580 as the off view controller. 12 00:00:43,600 --> 00:00:47,020 So in the top right, we're going to select it from the left here. 13 00:00:49,090 --> 00:00:53,950 Just press enter sometimes because sometimes it doesn't actually take now hit this icon in the top. 14 00:00:53,950 --> 00:00:54,490 Right. 15 00:00:55,510 --> 00:00:58,540 And we are going to look at our own view controller. 16 00:01:00,590 --> 00:01:04,730 Over here, so we're going to create the class of all of you controller. 17 00:01:10,960 --> 00:01:21,460 Which will need, of course, the import of a UI kit, otherwise you'll view controller won't actually 18 00:01:21,460 --> 00:01:22,010 appear here. 19 00:01:22,930 --> 00:01:23,670 So there it is. 20 00:01:23,680 --> 00:01:25,520 We now have our class. 21 00:01:26,290 --> 00:01:34,690 OK, so if we come back to this little left side here, we should now be able to click at Holding Control 22 00:01:35,530 --> 00:01:44,290 and drop it into our class so we can insert an outlet, which is email address input. 23 00:01:46,730 --> 00:01:48,380 And we can do the same with password. 24 00:01:48,860 --> 00:01:50,110 Oops, I pressed function there. 25 00:01:51,000 --> 00:01:52,450 Not quite what I was planning to do. 26 00:01:55,680 --> 00:01:59,370 And what's this going to be, password input 27 00:02:02,010 --> 00:02:04,530 and then we need an action for the login button. 28 00:02:06,820 --> 00:02:12,280 So we don't want an outlet for that one, we want an action, but by. 29 00:02:15,200 --> 00:02:16,100 Logging tapped. 30 00:02:18,980 --> 00:02:24,800 Maybe we want to pass over the button itself just to make sure that we have access to that button so 31 00:02:24,800 --> 00:02:30,620 we can do something with the button as in disable it, because we don't want the user to press it twice, 32 00:02:31,160 --> 00:02:35,240 because if they do that, they will try and register twice. 33 00:02:35,240 --> 00:02:36,650 And, of course, you'll get an error. 34 00:02:41,200 --> 00:02:45,210 Registered, tapped, set, that is button as well. 35 00:02:47,930 --> 00:02:51,290 And then finally forgot password control, click and drag. 36 00:02:54,440 --> 00:02:55,550 Forgot, tapped. 37 00:02:56,570 --> 00:03:01,490 Now, you might be wondering why I don't actually use the word button in these, I think sometimes it's 38 00:03:01,490 --> 00:03:02,810 not actually necessary to do that. 39 00:03:02,840 --> 00:03:04,070 I know I've said to do it. 40 00:03:04,070 --> 00:03:05,780 And as a beginner, perhaps you should. 41 00:03:06,110 --> 00:03:13,550 But as you get more advanced, you you start to realize that by just having the verb tapped, you understand 42 00:03:13,580 --> 00:03:18,160 that it's a button or it's a a way of entering user input as in a tap. 43 00:03:18,650 --> 00:03:20,660 So you don't have to have the word button. 44 00:03:20,840 --> 00:03:25,500 And if your sender is of type button, then you know that it's a button. 45 00:03:26,000 --> 00:03:32,330 So these are little shortcuts that you can take as you become more advanced as a developer so that you 46 00:03:32,330 --> 00:03:35,490 don't have to type anywhere near as much stuff. 47 00:03:35,850 --> 00:03:37,680 OK, so that's all the outlets set up. 48 00:03:37,700 --> 00:03:38,630 That's the view. 49 00:03:38,630 --> 00:03:39,540 Control is set up. 50 00:03:39,980 --> 00:03:40,610 Let's move on.