Core data 核心数据无限深入
我目前正在处理一个包含类别和子类别的表列表,在这里,您可以使用向下搜索浏览子类别,直到获得详细视图 我的灵感来自iphonesdkarticles.com 本博客中无限深入的解决方案是使用plist填充数组,并使用单个UITableView进行深入 我想将核心数据与NSFetchedResultsController一起使用,而不是使用plist。 我得到了第一个类别列表,但当我单击其中一个类别时,我得到了一个空表 我不知道在这种情况下使用NSFetchedResultsController是否是最合适的解决方案。当我使用DidSelectRowatinex时,可能我做错了什么:Core data 核心数据无限深入,core-data,Core Data,我目前正在处理一个包含类别和子类别的表列表,在这里,您可以使用向下搜索浏览子类别,直到获得详细视图 我的灵感来自iphonesdkarticles.com 本博客中无限深入的解决方案是使用plist填充数组,并使用单个UITableView进行深入 我想将核心数据与NSFetchedResultsController一起使用,而不是使用plist。 我得到了第一个类别列表,但当我单击其中一个类别时,我得到了一个空表 我不知道在这种情况下使用NSFetchedResultsController是否
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Categories *category = (Categories *)[fetchedResultsController objectAtIndexPath:indexPath];
MasterViewController *theViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
theViewController.CurrentLevel += 1;
theViewController.CurrentTitle = categories.name;
detailViewController.category = category;
[self.navigationController pushViewController:theViewController animated:YES];
}
要在核心数据中创建无限深入,只需将实体作为自身的关系 此处缺少某些内容,请添加更多代码。您似乎没有对detailViewController执行任何操作。该链接不再相关。非常感谢您的任何更新。