0 1 00:00:00,750 --> 00:00:01,020 All right. 1 2 00:00:01,030 --> 00:00:06,630 So we're going to create a brand-new Xcode project and it's going to be a Single View App, and it's 2 3 00:00:06,630 --> 00:00:10,320 going to be called WhatFlower or whatever you want to call it. 3 4 00:00:10,560 --> 00:00:14,900 And we're going to hit Next and I'm going to save it on my desktop. 4 5 00:00:14,910 --> 00:00:15,210 All right. 5 6 00:00:15,210 --> 00:00:19,530 So the first thing that we're going to need to do is to import our 6 7 00:00:19,550 --> 00:00:23,320 FlowerClassifier.mlmodel file into this brand-new Xcode project. 7 8 00:00:23,460 --> 00:00:24,520 So we've done it before. 8 9 00:00:24,540 --> 00:00:26,420 Why don't you pause the video and give it a go? 9 10 00:00:26,520 --> 00:00:26,780 All right. 10 11 00:00:26,790 --> 00:00:30,550 So if you don't remember, all you need to do is to locate it. 11 12 00:00:30,570 --> 00:00:34,190 And remember, we saved it inside this folder called Flower Classification, 12 13 00:00:34,350 --> 00:00:40,470 and here is our FlowerClassifier.mlmodel, and all that we need to do is just to click and drag 13 14 00:00:40,470 --> 00:00:48,570 it into our Xcode project, making sure that copy items if needed is checked, and hit Finish. And we'll 14 15 00:00:48,570 --> 00:00:51,930 let Xcode get on with the work of creating a class for our model. 15 16 00:00:51,930 --> 00:00:55,840 All right. So the first thing that we need to code up is 16 17 00:00:55,860 --> 00:00:56,860 a UIImagePickerController. 17 18 00:00:56,970 --> 00:01:01,080 So you've done this in past modules and I want to set it as a challenge. 18 19 00:01:01,140 --> 00:01:07,830 So go ahead and set up a UIImagePickerController that allows your app to take a photo, and then display 19 20 00:01:07,830 --> 00:01:09,200 it on the screen. 20 21 00:01:09,210 --> 00:01:11,090 So this is what it should look like. 21 22 00:01:11,310 --> 00:01:12,990 So let's look at the functionality. 22 23 00:01:13,020 --> 00:01:18,780 We've got an image view in the background here that's clear on startup and we've got a nav bar at the 23 24 00:01:18,780 --> 00:01:21,520 top, as well as a bar button item on the right. 24 25 00:01:21,540 --> 00:01:23,550 And this is in the shape of a camera. 25 26 00:01:23,730 --> 00:01:28,660 And when we tap on it, it brings up the camera and we're able to take a photo. 26 27 00:01:29,070 --> 00:01:35,670 And then we can tap the Use Photo to set that photo that we took as the image that's inside the image 27 28 00:01:35,670 --> 00:01:36,380 view. 28 29 00:01:36,780 --> 00:01:38,230 So pretty simple. 29 30 00:01:38,280 --> 00:01:39,670 And you've done this before 30 31 00:01:39,870 --> 00:01:41,170 and see if you can code it up.