I have iPhone application which overlays the camera with custom view. I have a button to switch between camera flash mode, this is the code
switch ([self.imagePickerController cameraFlashMode]) {
case UIImagePickerControllerCameraFlashModeAuto:
[self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn];
return @"On";
break;
case UIImagePickerControllerCameraFlashModeOn:
[self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOff];
return @"Off";
break;
case UIImagePickerControllerCameraFlashModeOff:
[self.imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeAuto];
return @"Auto";
break;
default:
break;
}
This is my problem: Worked perfectly fine on iOS 7.0x, but in iOS 7.1 the cameraFlashMode property returns UIImagePickerControllerCameraFlashModeAuto regardless of its real state.
The flash mode does change, but i get no indication of that. Any clues? Thanks