views:

88

answers:

1

Hi @ll

I am currently developing an app which is using the UIImagePickerController for taking pictures with the build in camera.

What I no want to do, is to provide the user a switch on bottom bar of the UIImagePickerController to be able to switch between the front and the rear camera (if available of course). I know how it's possible to determine if there's a front camera, but how can I show such a switch on the bottom bar?

Thanx for all your help!

A: 

Either set showsCameraControlsof your UIImagePickerController to YES or provide your own controls with cameraOverlayView.

For switching between front and rear camera use the cameraDevice property of UIImagePickerController.

tob
He means how he can actually **show** the front-camera.
Tim van Elsloo
Citation from the question: "...but how can I show such a switch..."
tob
Citation from the question: "...able to switch between the front and the rear camera", so he means how he can show a switch **that shows the front-camera when it's switched on**.
Tim van Elsloo
@Nuker Please clarify your question.
tob
What I want to have is the following: I want the UIImagePicker to have a switch on the bottom bar where the user can switch between the front and the rear camera when the UIImagePicker is shown. So, when the user presses a button "Take picture", I want to show him the common UIImagePicker and the user can choose within the UIImagePicker whether he wants to take a picture with the front or the rear camera. I hope this clarifies my question a bit.
Nuker
@Nuker Do you want to know how to present the controls (which is described in my answer) or how to switch between front and rear camera within your own code?
tob
Both. Because the UIImagePickerController doesn't provide any API to custom controls to it and I don't want to do it brute force so my app won't get certified by apple.
Nuker
Answer edited. Please check if it suits your needs now.
tob
Thanks for that, but how can I add a switch to right side of the bottom bar in the UIImagePickerController?
Nuker
I don't think that is possible.
tob