UIImagePickerController Showing Black Preview Screen

后端 未结 8 2255
醉梦人生
醉梦人生 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];
        } ) ;
    
    0 讨论(0)
  • 2021-02-08 12:32

    Try this. it solved my problem, make sure that there is a value

    (Application name as string) in your info.plist > "Bundle display name".

    In my case it was empty and because of that it didn't work.

    If "Bundle display name" is not there in the info.plist,then add a row named "Bundle display name" and paste your appname .

    0 讨论(0)
提交回复
热议问题