Ios RestKit 0.20嵌套对象映射使用API时出现问题
我正确地获得了标题为headerinsection的Ios RestKit 0.20嵌套对象映射使用API时出现问题,ios,api,tableview,restkit,Ios,Api,Tableview,Restkit,我正确地获得了标题为headerinsection的标题,在这里,它将叶子 但是主题却一无所获 我猜我到主题的映射不起作用,因为当我设置断点时,cellForRowForIndexPath似乎没有被调用 但显然我不确定,这就是为什么我在寻找一些指导。谢谢 API JSON { "springs": [{ "name": "baskets", "leafs": [{ "name": "New Season",
标题,在这里,它将叶子
但是主题却一无所获
我猜我到主题的映射不起作用
,因为当我设置断点时,cellForRowForIndexPath
似乎没有被调用
但显然我不确定,这就是为什么我在寻找一些指导。谢谢
API JSON
{
"springs": [{
"name": "baskets",
"leafs": [{
"name": "New Season",
"abbreviation": "nb",
"themes": [{
"name": "Hops",
"abbreviation": "HS",
}
ViewController.h
@property (strong, nonatomic) NSArray *springs;
@property (strong, nonatomic) NSMutableArray *leafs;
@property (strong, nonatomic) NSMutableArray *themes;
这条线
[springMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"themes" toKeyPath:@"themes" withMapping:themeMapping]];
应该是
[leafMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"themes" toKeyPath:@"themes" withMapping:themeMapping]];
因为主题嵌套在leaf中(leaf本身嵌套在spring中)。这很有道理!我仍然无法让它工作,你看到我的代码还有其他问题吗?非常感谢您的帮助。如果您还需要我提供任何其他信息来帮助您,请告诉我打开跟踪日志并将其发布在此处。有什么特别不起作用(当你修复关系时它有变化吗)?我试图用谷歌搜索“跟踪日志”,但没有找到它。你能更具体地告诉我在Xcode中它叫什么,或者我应该在那里使用什么工具吗?现在,我要做的是调试断点&控制台正在cellforrowatinexpath
的每一行设置断点。当我这样做并运行应用程序时,它会命中方法名称上的第一个断点,并跳两行到UITableViewCell*cell=[tableView dequeueReusableCellWithIdentifier:CellIdentifier]
。。。该行将突出显示。首先打开跟踪日志记录,而不是在启动加载后,根据您的建议移动代码。这就是你所说的吗?这就是你所说的全部吗?或者这方面还需要什么吗?谢谢你,韦恩!