作者:李林1108_965 | 来源:互联网 | 2023-05-17 18:39
CannotsetthecameraflashproperlyforiOSversions10andabove(thisisworkingcorrectlyiniOS
Cannot set the camera flash properly for iOS versions 10 and above (this is working correctly in iOS 9). It always defaults to UIImagePickerControllerCameraFlashModeAuto.
无法在iOS 10及更高版本中正确设置相机闪光灯(这在iOS 9中正常工作)。它总是默认为UIImagePickerControllerCameraFlashModeAuto。
Here's my code:
这是我的代码:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
[picker setAllowsEditing:NO];
[picker setDelegate:self];
[picker setSourceType:UIImagePickerControllerSourceTypeCamera];
[picker setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn];
[picker setCameraOverlayView:overlayView];
[self presentViewController:picker animated:YES completion:Nil];
1 个解决方案