我的应用程序使用苹果的UIImagePickerController从图片库获取图片。在某些iOS 12手机上,会显示一个空的图像选择器,并显示"No photos or videos“(无照片或视频)消息。问题是,手机的库中有照片。在应用程序之外拍摄并保存一张新照片,可以解决这个问题;一旦完成此操作,应用程序就可以像往常一样从图片库中进行选择。下面是传递给UIAlertController的块(询问是从相机</em
let imagePicker = UIImagePickerController()
animated: true,}
if (UIImagePickerController.isSourceTypeAvailableself.presentViewController(imagePicker, animated