我有 iPhone 应用程序,它用自定义视图覆盖相机。我有一个按钮可以在相机闪光模式之间切换,这是代码
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;
}
这是我的问题:在 iOS 7.0x 上工作得非常好,但在 iOS 7.1 中,无论其真实状态如何,cameraFlashMode 属性都会返回 UIImagePickerControllerCameraFlashModeAuto。
闪光模式确实改变了,但我没有得到任何迹象。有什么线索吗?谢谢