我使用AFNetworking將圖像插入到UITableViewCell中。問題是我需要滾動表格才能看到圖像。AFNetworking UIImageView需要滾動以加載圖像
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
Recipe *recipe = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.textLabel.text = recipe.value;
NSURL *url = [NSURL URLWithString:[BaseURLString stringByAppendingString:recipe.img]];
[cell.imageView setImageWithURL:url];
return cell;
}
你能證明你的setImageWithURL? – wesley
它是一種AFNetworking方法。我正在考慮用自己的方式做一個成功塊,然後在UITableView上使用reloadRowAtIndexPath方法,但必須是一些技巧,它是一個普遍的問題,想想 – Godfather