简体   繁体   English

iOS中如何使用UIDocumentPickerViewController导入文件 16

[英]How to use UIDocumentPickerViewController to import files in iOS 16

I was trying to use the UIDocumentPickerViewController to import some pdf files in my Swift UIKit App.我试图使用 UIDocumentPickerViewController 在我的 Swift UIKit 应用程序中导入一些 pdf 文件。 I'm not able to properly use the UIDocumentPickerViewController to display the files app and import the files from there.我无法正确使用UIDocumentPickerViewController来显示文件应用程序并从那里导入文件。

The initialiser UIDocumentPickerViewController(documentTypes: [String], in: UIDocumentPickerMode) was deprecated in iOS 14.0.初始化程序UIDocumentPickerViewController(documentTypes: [String], in: UIDocumentPickerMode)在 iOS 14.0 中被弃用。 I can still use it but is there a better way to do the same thing which is not deprecated and is used in the latest version of iOS?我仍然可以使用它,但是有没有更好的方法来做同样的事情,它没有被弃用,并在最新版本的 iOS 中使用?

Importing "UniformTypeIdentifiers" seems to enable the "init(forOpeningContentTypes: [UTType])" initializer.导入“UniformTypeIdentifiers”似乎启用了“init(forOpeningContentTypes: [UTType])”初始值设定项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何限制UIDocumentPickerViewController导入到.archive文件? (的NSKeyedArchiver) - How to restrict UIDocumentPickerViewController import to .archive files? (NSKeyedArchiver) iOS 13 如何将UIDocumentPickerViewController 与App Group 一起使用? - iOS 13 How to use UIDocumentPickerViewController with App Group? 导入模式下的UIDocumentPickerViewController返回.icloud文件 - UIDocumentPickerViewController in import mode returns .icloud files 如何从UIDocumentMenuViewController或UIDocumentPickerViewController获取文件的源? - How to get the source of the files from UIDocumentMenuViewController or UIDocumentPickerViewController? 如何设置最大文件数以在UIDocumentPickerViewController中选择 - How to set maximum files to select in UIDocumentPickerViewController 如何使用UIDocumentPickerViewController选择自定义类型? - How to use UIDocumentPickerViewController to pick a custom type? UIDocumentPickerViewController导入SSL证书 - UIDocumentPickerViewController import SSL Certificate iOS 14 中 UIDocumentPickerViewController 的初始化 - Initialization of UIDocumentPickerViewController in iOS 14 UIDocumentPickerViewController不显示所有文件 - UIDocumentPickerViewController not showing all files 如何从 iOS 14 中的 UIDocumentPickerViewController 获取文件名和文件大小? - How to get file name and file size from UIDocumentPickerViewController in iOS 14?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM