I want my application to use only the front camera. So I executed the following code.
if ([UIImagePickerControllerisCameraDeviceAvailable:UIImagePickerControllerCameraDeviceFront]) {
self.imagePickerController.cameraDevice = UIImagePickerControllerCameraDeviceFront;
}
This works the first time I open the camera (it uses the front camera). But if I canceled the photo, and then again enter the camera, it uses a rear view camera.
Each time you cancel / re-enter the camera, it switches between the front and rear cameras ...
Is there something I am missing?
source
share