0

有谁知道为什么像在 a中一样Select点击时没有选项?即使 multipleSelection 设置为. 我注意到它出现在模拟器上,但不在真实设备上。3 dotsUIDocumentPickerViewControllerFiles apptrue

private lazy var _documentPicker = UIDocumentPickerViewController(documentTypes: ["public.image",
         "public.audio",
         "public.movie",
         "public.text",
         "public.item",
         "public.content",
         "public.source-code"],
        in: .import)

private final func performDocumentsMenuOpen() {
        present(self._documentPicker, animated: true) {
            if #available(iOS 11.0, *) {
                self._documentPicker.allowsMultipleSelection = true
            } else {
                // Fallback on earlier versions
            }
        }
    }

图像

4

1 回答 1

1

由固定

  • allowsMultipleSelection = true在呈现 documentPicker 之前移动
  • 将动画更改为假present(self._documentPicker, animated: true)
于 2021-07-17T14:42:29.473 回答