Ios 手动显示PHPickerViewController时如何显示当前选定的照片?

Ios 手动显示PHPickerViewController时如何显示当前选定的照片?,ios,swift,ios14,photokit,phpickerviewcontroller,Ios,Swift,Ios14,Photokit,Phpickerviewcontroller,手动显示PHPickerViewController时,是否有方法显示用户当前的照片选择?例如,当使用以下代码时,选择器不会显示用户当前选择的任何照片 var pickerConfig = PHPickerConfiguration() pickerConfig.selectionLimit = 0 pickerConfig.filter = .any(of: [.images]) let imagePicker = PHPickerViewController

手动显示
PHPickerViewController
时,是否有方法显示用户当前的照片选择?例如,当使用以下代码时,选择器不会显示用户当前选择的任何照片

 var pickerConfig = PHPickerConfiguration()
 pickerConfig.selectionLimit = 0
 pickerConfig.filter = .any(of: [.images])
            
 let imagePicker = PHPickerViewController(configuration: pickerConfig)
 imagePicker.delegate = self

 // When presented, the user's current selected photos are empty, nothing is selected
 viewController.present(imagePicker, animated: true)
但是,如果我使用Apple内置的
presentLimitedLibraryPicker
功能,它会显示用户当前的照片选择:

// This does show the user's current selections
PHPhotoLibrary.shared().presentLimitedLibraryPicker(from controller: self)

有没有一种方法可以在不使用
presentLimitedLibraryPicker
的情况下获得此行为?

尝试将
selectionLimit
增加到大于0的值在这种情况下什么是“当前选择”?你的意思是,在你展示之后,用户现在在选择器中选择的是什么?或者用户以前选择了什么?还是什么?@matt我指的是用户以前选择的照片。因此,如果他们选择了20张照片,并且我展示了PHPickerViewController,那么这些选择都不会显示。如果他们选择了20张照片,那么之前在哪里?以前什么时候?PHPickerViewController没有内存,它不知道“以前”发生过什么事。@aheze谢谢你的建议,但我已经尝试过了,它不起作用。PHPickerConfiguration上的选择限制为0表示系统支持的最大值。