【发布时间】:2021-02-21 09:08:47
【问题描述】:
我正在使用以下代码导入文件,
if #available(iOS 14, *) {
let supportedTypes: [UTType] = [UTType.text, UTType.data]
let documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: supportedTypes, asCopy: true)
documentPicker.delegate = self
documentPicker.modalPresentationStyle = .formSheet
self.present(documentPicker, animated: true, completion: nil)
}
在输出中,我们可以看到“最近/浏览器”标签栏和文档内容视图之间的透明视图。
这是输出的截图:
如果我将演示样式更改为全屏,透明视图将变为灰色视图
documentPicker.modalPresentationStyle = .fullScreen
这是全屏输出的截图:
有谁知道如何解决这个问题?
【问题讨论】:
标签: ios14 uidocumentpickerviewcontroller