[英]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.