【发布时间】:2013-02-12 08:42:38
【问题描述】:
我是 Objective-C 的新手。
我在 .plist 上创建了所有数据,其中所有数据都存储在 Response 字典中。
NSString *myListPath = [[NSBundle mainBundle] pathForResource:@"OffersList" ofType:@"plist"];
dic = [NSDictionary dictionaryWithContentsOfFile:myListPath];
tableData = [dic objectForKey:@"Response"];
现在我已将 tabledata 转换为字典。
NSDictionary *dict = [tableData objectAtIndex:indexPath.row];
cell.titleLabel.text = [dict objectForKey:@"title"];
cell.nowLabel.text = [dict objectForKey:@"price"];
cell.saveLabel.text = [dict objectForKey:@"rondel"];
现在,问题是它只加载了前 10 个数据。
我也尝试在日志中打印,但在第 10 个数据之后,它的值被视为NULL。
【问题讨论】:
标签: uitableview nsarray plist nsdictionary