使用来自管理对象的集合作为获取结果控制器的数据
|
我想创建一个导航界面,用户可以在其中点击一个单元格,并拥有一个与上一个相同的新导航控制器。我的托管对象具有以下结构:
name (string)
orderId (int)
orderBy (string, a key path indicating what to order the table with)
dateCreated (date)
items (a relationship pointing to the items for the next table)
在点击包含非零项目的项目时,下一个控制器获得对被点击项目的引用,并使用其“项目”,“ orderBy”和“ orderId”来构造获取的结果控制器( (其项目作为数据)和排序描述符(使用orderBy和OrderId)。
如何告诉获取的结果控制器将项目返回的ѭ1用作其数据?我可以使用谓词将结果限制为仅一个对象的项吗?谢谢
没有找到相关结果
已邀请:
1 个回复
坝胺绣敝
基本上,您正在搜索与所选对象有父级关系的所有\“ item \”。 让我知道我是否描述正确(很抱歉,如果我没有这样做,但是我自己做,可以指出一个Apple示例)。 编辑:Apple示例代码 http://developer.apple.com/library/ios/#samplecode/CoreDataBooks/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008405 http://developer.apple.com/library/ios/#samplecode/iPhoneCoreDataRecipes/Introduction/Intro.html#//apple_ref/doc/uid/DTS40008913