如何在我的应用程序中使用Safari的输入文件选择器?(How Do I Use Safari's Input File Picker In My App?)

编程入门 行业动态 更新时间:2024-10-10 00:27:57
如何在我的应用程序中使用Safari的输入文件选择器?(How Do I Use Safari's Input File Picker In My App?)

每当我使用Safari浏览网页并遇到<input type="file">元素时,我可以选择它,Safari会向我提供一个弹出菜单(操作表?),如下所示:

这种控件是否可以在我的应用中实现? 我能找到的只是UIImagePickerController ,它似乎只是用于拾取图像。 我想要根据用户设备上可用的不同应用程序(相机,照片库,iCloud,Dropbox,Google Drive等)选择任何文件的全方位选项。

如果没有传统意义上的可用,我可以尝试以某种方式使用Web视图来破解它吗?

Whenever I use Safari to browse the web and come across a <input type="file"> element, I can select it and Safari presents me with a popup menu (action sheet?) that looks like the following:

Is this type of control available to implement in my app? All I can find is UIImagePickerController which seems to be just for picking images. I want the full range of options for choosing any file based on the different apps available on the user's device (Camera, Photo Library, iCloud, Dropbox, Google Drive, etc).

If not available in the traditional sense could I try to hack it in with a web view somehow?

最满意答案

这是一个UIDocumentMenuViewController 。

另请参见UIDocumentPickerViewController 。

That is a UIDocumentMenuViewController.

See also UIDocumentPickerViewController.

更多推荐

本文发布于:2023-07-31 09:20:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1342035.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   文件   选择器   如何在   Picker

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!