I see lots of tutorials for using UIImagePickerController to select images from the iPhone's Camera or Photo Library, but I'm wondering if it can also be used to select images from the documents directory?
My use case is that I'd like to supply a number of images with my app, and allow the user to pick one to apply to the background. Can I use UIImagePickerController for this, or do I need to create something custom?
Thanks in advance!
I believe UIImagePickerController
is limited to the photo library. Plus, Documents directory data is within the app and not the user's device . What I mean is that they are two different things. As soon as you delete your app, documents directory data is deleted as well.
And as for your use case, you don't need a UIImagePickerController
. All you need is to load all the images from documents directory and display it inside a collectionView or tableView for user to select from. And since in your case you have images to be selected, I would recommend using collectionView !