Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIDocumentBrowserViewController允许拾取多个项目不工作_Ios_Swift - Fatal编程技术网

Ios UIDocumentBrowserViewController允许拾取多个项目不工作

Ios UIDocumentBrowserViewController允许拾取多个项目不工作,ios,swift,Ios,Swift,我对swift中的DocumentBrowserViewController有一些有趣的问题,我想停止多个文件选择并隐藏导航栏中的Salect按钮 出于这个原因,我使用属性allowsPickingMultipleItems,但它似乎没有效果 我更改viewDidLoad上的属性 override func viewDidLoad() { super.viewDidLoad() delegate = self allowsDocumentCreation = false

我对swift中的DocumentBrowserViewController有一些有趣的问题,我想停止多个文件选择并隐藏导航栏中的Salect按钮

出于这个原因,我使用属性allowsPickingMultipleItems,但它似乎没有效果

我更改viewDidLoad上的属性

override func viewDidLoad() {
    super.viewDidLoad()

    delegate = self
    allowsDocumentCreation = false
    allowsPickingMultipleItems = false
}
我从

获得的代码是一个bug:
因此,我改为使用“UIDocumentPickerViewController”

allowsPickingMultipleItems=false
防止用户同时打开多个文件(在文档浏览器中)或同时拾取多个文件(在文档选择器中)。这永远不会删除“选择”按钮,该按钮用于对项目执行操作(例如,通过电子邮件共享),而您的应用程序无法控制该按钮。

您希望实现什么?停止多文件选择并从右上角隐藏“选择”按钮。这就是它现在的样子参考@PiyushPatel thans,我看到了这一点,我尝试了它,正如您在示例中看到的,我已经将属性设置为false,但我仍然有多个文件选择和顶部的选择按钮请更好地描述您的备选方案,并写下您如何解决这一问题的更多细节。欢迎来到Stackoverflow:)