UIImagePickerController Showing Black Preview Screen

后端 未结 8 2252
醉梦人生
醉梦人生 2021-02-08 12:03

I am having a problem when calling the UIImagePickerController to use the camera. Sometimes, but more often than none, the preview screen shows to be black (as the camera itsel

8条回答
  •  遥遥无期
    2021-02-08 12:29

    Try this...

    dispatch_async(dispatch_get_current_queue(), ^(void){
        imagePicker.sourceType =
        UIImagePickerControllerSourceTypeCamera;
        imagePicker.delegate = self;
        [self presentModalViewController:imagePicker animated:YES];
        } ) ;
    

提交回复
热议问题