我尝试使用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];
答案 0 :(得分:1)
初始化dvc.allowsMultipleSelection = true;
后设置UIDocumentPickerViewController
。