首页 > 解决方案 > 在 iOS 13 中使用什么来代替 UIImagePickerControllerReferenceURL?

问题描述

从 iOS 11 开始不推荐使用 UIImagePickerControllerReferenceURL。文档说要使用 PHPickerViewController,但这只能从 iOS 14 开始使用。对于介于两者之间的项目,即需要 iOS 13 的项目,我应该使用什么?

标签: iosswiftuiimagepickercontroller

解决方案


尝试使用 UIImagePickerController.InfoKey.phAsset 而不是 UIImagePickerControllerReferenceURL。这可从 iOS 11 获得

在此处输入图像描述


推荐阅读