gpt4 book ai didi

ios - 如何添加返回或取消按钮以关闭 UIDocumentBrowser

转载 作者:行者123 更新时间:2023-11-28 09:39:46 25 4
gpt4 key购买 nike

我需要显示 UIDocumentBrowser 以上传文档。但我无法在导航栏中放置后退或取消按钮。下图是 WhatsApp 中文件浏览器的截图。谁能帮帮我?

enter image description here

最佳答案

UIDocumentBrowserViewController 被设计为仅用作 Root View Controller ,这就是它没有“返回”或“取消”按钮的原因。根据文档:

https://developer.apple.com/documentation/uikit/view_controllers/adding_a_document_browser_to_your_app

Important

Always assign the document browser as your app's root view controller. Don't place the document browser in a navigation controller, tab bar, or split view, and don't present the document browser modally.

If you want to present a document browser from another location in your view hierarchy, use a UIDocumentPickerViewController instead.

关于ios - 如何添加返回或取消按钮以关闭 UIDocumentBrowser,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52221968/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com