Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIImagePickerController open in camera roll

Is it possible to open camera roll directly with UIImagePickerController but still have the back button to your album list?

UIImagePickerControllerSourceTypeSavedPhotosAlbum will open only the camera roll without the option to slide back to albums.

like image 350
Eyal Avatar asked Jan 30 '14 13:01

Eyal


People also ask

What is camera roll in gallery?

Camera Roll is a photo gallery app that offers a fluid and elegant interface where you can comfortably view all your photos, GIFs, and videos. Plus, you can see all the Exif information for each of your photos.

How do I open the camera in Swift 4?

To access the camera in Swift, we first must ask the user for permission. Open up your Info. plist file from your Project Navigator. Then right click and click Add Row .


2 Answers

Unfortunately, the answer is -- it's not possible. At least not through any standard interface. It might be possible to do some view hierarchy mining or method swizzling to make it happen, but then you may run afoul of the App Store submissions review.

From the Camera Programming Topics of iOS (bolded emphasis mine):

Instead of using the camera as the media source, you use the Camera Roll album or Saved Photos album, or the entire photo library.

And:

Source type To configure the picker for browsing saved media as opposed to capturing a new picture or movie, set its sourceType property to one of the saved photo sources:

Use UIImagePickerControllerSourceTypePhotoLibrary to present a browser that provides access to all the photo albums on the device, including the Camera Roll album on devices that have a camera.

Use UIImagePickerControllerSourceTypeSavedPhotosAlbum to present a browser that restricts access to the Camera Roll album on devices that have a camera, or to the Saved Photos album on devices that don’t.

like image 192
memmons Avatar answered Sep 28 '22 12:09

memmons


I would rather suggest you to use custom imagepickers like elcimagepicker. afer going through the code properly you can achieve the thing you want with the help of minor manipulations.

like image 29
Anubrata Santra Avatar answered Sep 28 '22 13:09

Anubrata Santra