Ios8 是否可以在UIDocumentPickerViewController中立即打开Dropbox或GoogleDrive?

Ios8 是否可以在UIDocumentPickerViewController中立即打开Dropbox或GoogleDrive?,ios8,dropbox,icloud,Ios8,Dropbox,Icloud,我需要制作一个自定义菜单,而不是带有按钮的UIDocumentMenuViewController:iCloud、Dropbox和Google Drive 是否可以在UIDocumentPickerViewController中立即打开Dropbox或GoogleDrive(默认情况下,iCloudDrive将打开) 您应该使用UIDocumentMenuViewController,如 UIDocumentMenuViewController *menus = [[UIDocumentMenu

我需要制作一个自定义菜单,而不是带有按钮的UIDocumentMenuViewController:iCloud、Dropbox和Google Drive


是否可以在UIDocumentPickerViewController中立即打开Dropbox或GoogleDrive(默认情况下,iCloudDrive将打开)

您应该使用UIDocumentMenuViewController,如

UIDocumentMenuViewController *menus = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport];
menus.delegate = self;
[self presentViewController:menus animated:YES completion:nil];
在这个菜单中,用户可以选择iCloud、google drive、dropbox等 显示句柄UIDocumentPickerDelegate、UIDocumentMenuDelegate以显示选择器并执行某些操作

比如说

- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url {
    if (controller.documentPickerMode == UIDocumentPickerModeImport) {
     // do something
    }
}
- (void)documentMenu:(UIDocumentMenuViewController *)documentMenu didPickDocumentPicker:(UIDocumentPickerViewController *)documentPicker {
    documentPicker.delegate = self;
    [self presentViewController:documentPicker animated:YES completion:nil];
}
注意。 用户需要安装谷歌驱动器或dropbox应用程序,然后可以看到驱动器菜单

英语很差,希望你能理解