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

How do I enable multiple files selection while picking file using UIDocumentPickerViewController?

我正在尝试使用 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;