【发布时间】:2021-10-18 22:42:18
【问题描述】:
在使用 IOS 14.5 部署目标的 Xcode 12.5.1 中遵循 UIDocumentPickerViewController 的现场 IOS 文档时,出现错误:
Incorrect argument label in call (have 'forOpeningContentTypes:', expected 'forExporting:')
关于现在应该如何使用 IOS UIDocumentPickerViewController 的任何建议?
我的代码除外:
// Create a document picker for directories.
let documentPicker =
UIDocumentPickerViewController(forOpeningContentTypes: [.folder])
documentPicker.delegate = self
错误快照:
如何在此处使用文档选择器的文档:
https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories 给出:
【问题讨论】:
-
为我工作 - Xcode 12.5 (12E262)
标签: ios swift xcode uidocument uidocumentpickerviewcontroller