From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Photos picker

Photos picker

- [Instructor] iOS 14 adds a new photo picker, which does not require user permission and can be easily implemented in your code. Let's take a look at this remarkable picker. In the exercise code, I got a storyboard set up for you and I set the outlets and actions. Now, I'm going to go back into the code here, and you'll see some of the stuff I already preset for you. At the top here I imported PhotosUI, which is the framework you're going to need to use this, and I also added a delegate, PHPickerViewControllerDelegate, that we're going to be using, and you can see that I started to fill it out down here, and we're going to start looking at what we do with this. Most pickers have some form of this, where you set the picker and then you set a delegate for the picker and you present the picker. So that's all pretty much the same. The thing that's different with this photo picker is, right here, is this config variable, and you…

Contents