gpt4 book ai didi

ios - 使用 UIDocumentPickerViewController 选择文件时如何启用多个文件选择?

转载 作者:行者123 更新时间:2023-12-01 16:14:34 27 4
gpt4 key购买 nike

我正在尝试使用 UIDocumentPickerViewController 从文件应用程序中选择文件,但我看不到用于在选择器中进行多项选择的 Select 按钮。为什么会这样?我做错了什么吗?谁能帮忙?

代码片段:

NSArray *arrContents = @[@"public.content",@"public.item",@"public.composite-content",@"public.data",@"public.database",@"public.calendar-event",@"public.message",@"public.presentation",@"public.contact",@"public.archive",@"public.disk-image",@"public.text",@"public.plain-text",@"public.utf8-plain-text",@"public.utf16-external-plain-​text",@"public.utf16-plain-text",@"com.apple.traditional-mac-​plain-text",@"public.rtf"];

UIDocumentPickerViewController *dvc = [[UIDocumentPickerViewController
alloc]initWithDocumentTypes:arrContents inMode:UIDocumentPickerModeImport];
dvc.delegate = self;
[self presentViewController:dvc animated:true completion:nil];

最佳答案

在初始化 UIDocumentPickerViewController 之后设置 dvc.allowsMultipleSelection = true;

关于ios - 使用 UIDocumentPickerViewController 选择文件时如何启用多个文件选择?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47511682/

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