UIImagePickerController opens in camera

Is it possible to open the camera frame directly using the UIImagePickerController , but still have a back button in the album list?

UIImagePickerControllerSourceTypeSavedPhotosAlbum will only open the camera roll without the ability to go back to albums.

+6
source share
3 answers

Unfortunately, the answer is impossible. At least not through the standard interface. You may be able to complete some kind of view hierarchy process or swizzling method for this to happen, but then you may come across an overview of the views in the App Store.

From the iOS Camera Programming Topics (highlighted by me, highlighted by me):

Instead of using the camera as a multimedia source, you use the camera Album album or saved photos, or the entire library of photos.

AND:

Type of source . To configure the collector to view saved media as opposed to capturing a new image or movie, set its sourceType property for one of the saved photo sources:

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

Use the UIImagePickerControllerSourceTypeSavedPhotosAlbum to present a browser that restricts access to the Camera Roll album on devices with a camera or the Saved Photos Album on devices that do not work.

+3
source

I would prefer you to use custom images like elcimagepicker. If you execute the code correctly, you can achieve what you want with minor manipulations.

0
source

I faced the same situation. And found a solution, here is the code. Hope this helps.

 pImagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; id albumCtrller = pImagePicker.topViewController; pImagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; [pImagePicker pushViewController: albumCtrller animated: NO]; 

Now you can open the album and go back.

0
source

All Articles