Iphone don';我不想使用UITableViewCell的dequeueReusableCellWithIdentifier

Iphone don';我不想使用UITableViewCell的dequeueReusableCellWithIdentifier,iphone,ios,uitableview,Iphone,Ios,Uitableview,在我的UITableViewCells中,我需要为每个单元格下载不同的图像,我应该如何处理此类问题…您仍然应该使用该方法,然后独立配置每个单元格。只需确保您的单元设置不在构建块上 UITableViewCell *cell = [tableView dequeue..]; if (!cell) { cell = ...; } cell.image = ...; 项目将是您的图像字典 - (UITableViewCell *)tableView:(UITableView *)tabl

在我的UITableViewCells中,我需要为每个单元格下载不同的图像,我应该如何处理此类问题…

您仍然应该使用该方法,然后独立配置每个单元格。只需确保您的单元设置不在构建块上

UITableViewCell *cell = [tableView dequeue..];
if (!cell) {
    cell = ...;
}

cell.image = ...;

项目将是您的图像字典

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

 UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"MyIdentifier"]];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
NSDictionary *item = (NSDictionary *)[self.content objectAtIndex:indexPath.row];
cell.textLabel.text = [item objectForKey:@"mainTitleKey"];
cell.detailTextLabel.text = [item objectForKey:@"secondaryTitleKey"];
NSString *path = [[NSBundle mainBundle] pathForResource:[item objectForKey:@"imageKey"] ofType:@"png"];
UIImage *theImage = [UIImage imageWithContentsOfFile:path];
cell.imageView.image = theImage;
return cell;
  }

从哪里加载图像??