Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a "Pick from Photo Library" button to UIImagePickerController's toolbar

I am implementing a flow where the user can either select a photo from their library or take a photo using the camera. When presenting the UIImagePickerController modally I have to either go:

picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;  

or

picker.sourceType = UIImagePickerControllerSourceTypeCamera;

This means presenting a "scaffolding controller" where to user can pick either their Library or the Camera. I see that most other apps with this kind of functionality go directly to the Camera controller, but displays a button for selecting from the library instead.

All examples/tutorials I can find, including Apple's PhotoPicker source, does this empty viewController where you pick from camera or library - but all apps I check does the 'direct to camera - with the option for going to library".

How do I add the photo library button option to the camera tool bar?

(app >= iOS 4.3)

Thanks for any help given.

like image 452
RickiG Avatar asked Jan 16 '12 10:01

RickiG


1 Answers

According to this previous question

Enabling the photo library button on the UIImagePickerController

you can use cameraOverlayView and showsCameraControls to make the implementation.

-Vik

like image 95
Vik Avatar answered Sep 29 '22 07:09

Vik