6

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

4

0 回答 0