ios - UIDocument中如何实现文件协调

标签 ios icloud uidocument nsfilecoordinator

我已经实现了 UIDocument 功能(contentsForType:error:, SaveToURL:forSaveOperation:completionHandler:, loadFromContents:ofType:error:)来在 iCloud 中存储简单的文本文件。

如何实现文件协调?有什么好处?我是否需要对以前的代码进行读取/写入操作的更改?

谢谢!

最佳答案

UIDocument 已经“免费”提供文件协调。有关使用 UIDocument 的更多优势,请参阅此处的 UIDocument 文档:https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIDocument_Class/index.html

关于ios - UIDocument中如何实现文件协调,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25588373/

相关文章:

macos - URLForUbiquityContainerIdentifier (iCloud) 的路径不正确

objective-c - iCloud 显示套装有什么用?

ios - 在 UIDocumentInteractionController 的 presentPreviewAnimated 中禁用操作项

ios - 尽管指示成功,但 UIDocument 未保存到文件

swift - 文档在文档浏览器中显示为灰色

ios - 使用 expo-apple-authentication 包不显示 Apple 身份验证按钮

ios - 基于变量的索引路径中项目的 UICollectionView 单元格

cocoa-touch - NSMetadataQuery 找不到 NSFileWrapper 文件夹包,只有文件(但它们在那里)

objective-c - 如何呈现完全一样的 View ?

ios - 以编程方式执行多个 segue