All right. 1
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
going to be called WhatFlower or whatever you want to call it. 3
And we're going to hit Next and I'm going to save it on my desktop. 4
All right. 5
So the first thing that we're going to need to do is to import our 6
FlowerClassifier.mlmodel file into this brand-new Xcode project. 7
So we've done it before. 8
Why don't you pause the video and give it a go? 9
All right. 10
So if you don't remember, all you need to do is to locate it. 11
And remember, we saved it inside this folder called Flower Classification, 12
and here is our FlowerClassifier.mlmodel, and all that we need to do is just to click and drag 13
it into our Xcode project, making sure that copy items if needed is checked, and hit Finish. And we'll 14
let Xcode get on with the work of creating a class for our model. 15
All right. So the first thing that we need to code up is 16
a UIImagePickerController. 17
So you've done this in past modules and I want to set it as a challenge. 18
So go ahead and set up a UIImagePickerController that allows your app to take a photo, and then display 19
it on the screen. 20
So this is what it should look like. 21
So let's look at the functionality. 22
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
top, as well as a bar button item on the right. 24
And this is in the shape of a camera. 25
And when we tap on it, it brings up the camera and we're able to take a photo. 26
And then we can tap the Use Photo to set that photo that we took as the image that's inside the image 27
view. 28
So pretty simple. 29
And you've done this before 30
and see if you can code it up.