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.imagePi
I solved it like this:
@property (nonatomic) NSInteger flashMode;
if (_flashMode == UIImagePickerControllerCameraFlashModeAuto)
{
_flashMode = UIImagePickerControllerCameraFlashModeOff;
}
else if (_flashMode == UIImagePickerControllerCameraFlashModeOff)
{
_flashMode = UIImagePickerControllerCameraFlashModeOn;
}
else if (_flashMode == UIImagePickerControllerCameraFlashModeOn)
{
_flashMode = UIImagePickerControllerCameraFlashModeAuto;
}
_cameraPicker.cameraFlashMode = (UIImagePickerControllerCameraFlashMode)_flashMode;