【发布时间】:2016-09-07 17:17:27
【问题描述】:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *cellIdentifier = @"ChatCell";
ChatCell *cell = \[tableView dequeueReusableCellWithIdentifier:@"myCell"\];
if (cell == nil)
{
\[tableView registerNib:\[UINib nibWithNibName:cellIdentifier bundle:nil\] forCellReuseIdentifier:@"myCell"\];
cell = \[tableView dequeueReusableCellWithIdentifier:@"myCell"\];
}
ChatData *chatData = \[self.loadedChatData objectAtIndex:\[indexPath row\]\];
\[cell.images sd_setImageWithURL:\[NSURL URLWithString:@"http://dev.apppartner.com/AppPartnerProgrammerTest/images/justin_avatar.png,http://dev.apppartner.com/AppPartnerProgrammerTest/images/drew_avatar.png"\]placeholderImage:\[UIImage imageNamed:@"placeholder"\]\];
\[cell loadWithData:chatData\];
return cell;
}
当我尝试将多个图像从本地 json 文件加载到我的 tableview 时,为什么会出现 CFNetwork 内部错误?
【问题讨论】:
-
你从哪里加载本地文件?实际错误是什么?哪一行代码?
-
是的,我正在从本地文件 @rmaddy 加载我的图像
-
我不确定这是否是错误的原因。但是,如果这是我应该怎么做@SausageMachine
标签: ios objective-c json uitableview uiimageview