我在LLSimple的自定义叠加层内使用imagepickerview controller相机。切换时已添加闪光灯开/关。我想放自动闪光灯功能。请帮我解决这个问题。

最佳答案

当您这样做时:

    self.imagePickerController = [[UIImagePickerController alloc] init];
    [self.imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
    [self.imagePickerController setCameraCaptureMode:UIImagePickerControllerCameraCaptureModePhoto];
........

明确提及
[imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn];

如果您不这样做,那么相机默认为UIImagePickerControllerCameraFlashModeAuto并且由于您实现的逻辑无法处理这种情况,因此仍保留在UIImagePickerControllerCameraFlashModeAuto

关于ios - 如何在iOS的自定义图像选择器 View 中进行自动闪光,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36855508/

10-10 20:37