How can i display only limited photos with PHPickerViewController?

2.4k views Asked by At

I use Limited Photos Library feature and have selected a few photo but when use PHPickerViewController to select images in the application, PHPickerViewController shows all images in the gallery instead of just a few selected ones before.

Is it possible to display only pre-selected images in PHPickerViewController? If not, how to display a list of pre-selected images so that the user can choose as UIImagePickerController before.

Thanks to everyone for sharing and commenting

1

There are 1 answers

0
Michał Ziobro On

I think it is separate API

  1. Requesting for photo access permission
  2. Displaying UIImagePicker/PHPicker view controller

ad. 1 you request access so then you can get all photos or selected photos and display them on you ui just like Instagram app do it. Then you can add Manage button to change limited access permission.

ad. 2 If you are using UIImagePicker or PHPicker you do not need to request for permission, and moreover this two view controllers give you read-only access to all photos.

So I think if you are using UIImagePicker, PHPicker you do not need to request Photo access permission. If you request it you are using it for more advanced usage and do not use UIImagePicker or PHPicker just create your custom UI....?