我检查了最新的Dropbox和Excel for iOS.在Dropbox中,我们得到一个编辑按钮.单击它会打开Excel的扩展,您可以在其中编辑文件.
保存后,更改也会反映在Dropbox文件中.
我想添加这样一个按钮.此外,我想在图像中添加这样一个按钮,以便在可用的"照片编辑"应用程序中打开它们.
如何检查文件(图像,xls,doc或任何其他)是否可以打开进行编辑?
代码到目前为止:
UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithURL:url inMode:UIDocumentPickerModeExportToService];
documentPicker.delegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentPicker animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)
还尝试将模式改为UIDocumentPickerModeMoveToService......

根据apple docs移动本地文档.用户选择外部目的地.文件选择器移动文件; 但是,您仍然可以将文档作为外部文档访问,让用户可以编辑文档.
但我尝试了所有四种模式.没有显示excel选项.
UIDocumentPickerModeImport,
UIDocumentPickerModeOpen,
UIDocumentPickerModeExportToService,
UIDocumentPickerModeMoveToService
Run Code Online (Sandbox Code Playgroud)