简体   繁体   中英

how to make auto flash in custom imagepicker view in iOS

I'm using LLSimple camera within custom overlay in imagepickerview controller . I have added flash on/off when I toggle. I want to put auto flash functionality. Plz help me to resolve this.

When you do:

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

explicitly mention

[imagePickerController setCameraFlashMode:UIImagePickerControllerCameraFlashModeOn];

If you don't then the camera defaults to UIImagePickerControllerCameraFlashModeAuto and since the logic you've implemented doesn't handle this case, it remains in UIImagePickerControllerCameraFlashModeAuto

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM