From the course: Machine Learning for iOS Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Implement an image picker controller - iOS Tutorial
From the course: Machine Learning for iOS Developers
Implement an image picker controller
- [Instructor] Our first task is going to make it possible for our users to actually tap on this image view to bring out an image picker controller and select a photo from the Photo Library. And since this is a very privacy-related feature, what you have to do in the info.plist is to specify a reason why you'd like to access the user's Photo Library. And I have already done this so in the info.plist file, I have added the key, Privacy Photo Library Usage Description. And my usage description is a little bit funny, so I am saying, you want to make sure a dog is really a dog, don't you. So if you're shipping your application then, maybe this should be a little bit more purposeful. But having said that, let's go into our view controller and add the necessary code to actually display an image picker controller. And in my selectImageSource function in line 26 in the ViewController.swift file, what I'd like to do is just create an imagePicker object. And we can just initialize that with…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Our sample app: Dogs vs. Cats1m 3s
-
(Locked)
A quick look around the Xcode project1m 46s
-
(Locked)
Implement an image picker controller7m 46s
-
(Locked)
The Vision framework and Core ML1m 57s
-
(Locked)
An animal detector powered by Vision13m 30s
-
(Locked)
Our machine learning model in action3m 44s
-
(Locked)
-