UIManagedDocument示例/教程 [英] UIManagedDocument example / tutorial

查看:143
本文介绍了UIManagedDocument示例/教程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力创建一个简单的 UIManagedDocument 库样式应用程序(保存到iCloud的单独文档)。

I have been trying very unsuccessfully to create a simple UIManagedDocument library style application (separate documents saved to iCloud).

我对以下内容感到困惑:

I am confused with the following:

我是否继承 UIManagedDocument 并设置 persistentStoreCoordinator ManagedObjectModel &这个子类中的 ManagedObjectContext ,或者这些应该是在 AppDelegate 中配置的(如果是的话,我该如何去关于刷新 persistentStoreCoordinator 来查看新文件 - 似乎一旦读过 persistentStore 我就可以'得到它读取一个新的持久性商店)?

Do I subclass UIManagedDocument and set up the persistentStoreCoordinator, ManagedObjectModel & ManagedObjectContext within this subclass, or are these supposed to be configured within the AppDelegate (and if so, how do I go about refreshing the persistentStoreCoordinator to look at the new file - it seems that once that has read a persistentStore that I can't get it to read a new persistent store)?

推荐答案

从给定的链接下载样本,它将帮助您解决你的问题

Download the sample from the given link, it will help you to solve your problem

core-data-documents-using-icloud

这篇关于UIManagedDocument示例/教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆