无法为 iOS 10 及更高版本正确设置相机闪光灯(这在 iOS 9 中正常工作)。它始终默认为 UIImagePickerControllerCameraFlashModeAuto。
这是我的代码:
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];