UIImagePickerController有时会显示空白,并显示控制台错误,提示您连接到com.apple.mobileslideshow.photo-picker.viewservice

时间:2019-01-30 18:08:36

标签: uikit uiimagepickercontroller

连续拾取许多图像时,UIImagePickerController将显示空白(白色弹出框),并打印以下控制台消息:

  

UIImagePickerController UIViewController创建错误:错误   域= NSCocoaErrorDomain代码= 4097“连接到名为服务   com.apple.mobileslideshow.photo-picker.viewservice“   UserInfo = {NSDebugDescription =连接到名为的服务   com.apple.mobileslideshow.photo-picker.viewservice}

来源:

let imagePickerController = UIImagePickerController()
imagePickerController.sourceType = UIImagePickerController.SourceType.photoLibrary
imagePickerController.allowsEditing = false
imagePickerController.delegate = self

imagePickerController.modalPresentationStyle = .popover
        imagePickerController.popoverPresentationController?.barButtonItem = self.addButton

self.present(imagePickerController, animated: true, completion: nil)

通常,如果我再次打开UIImagePickerController,它将正常工作。

任何线索是什么问题?

0 个答案:

没有答案