Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c TTTableViewController和JSon_Objective C_Json_Three20 - Fatal编程技术网

Objective c TTTableViewController和JSon

Objective c TTTableViewController和JSon,objective-c,json,three20,Objective C,Json,Three20,在tableview中加载数据时遇到问题。当视图加载时,我看到了表格,但单元格中没有填充任何内容 PMs.h PMs.m 当我这样做的时候 NSLog(@"Data: %@",[dict objectForKey:@"subject"]); 如果显示正在检索的所有主题行,但不填充表格。而不是 self.dataSource = [TTListDataSource dataSourceWithItems:tableItems.items]; 你为什么不这样

在tableview中加载数据时遇到问题。当视图加载时,我看到了表格,但单元格中没有填充任何内容

PMs.h

PMs.m

当我这样做的时候

NSLog(@"Data: %@",[dict objectForKey:@"subject"]);
如果显示正在检索的所有主题行,但不填充表格。

而不是

self.dataSource = [TTListDataSource
                   dataSourceWithItems:tableItems.items];
你为什么不这样做呢

self.dataSource = tableItems;
您可能还需要考虑创建一个与您的数据源相匹配的模型——也就是说,一个扩展TTModel或TTURLRequestModel的类,因为您正在进行URL请求

self.dataSource = [TTListDataSource
                   dataSourceWithItems:tableItems.items];
self.dataSource = tableItems;