- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.textLabel.text = @"标题";
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:@"http://static.open-open.com/j300250n.jpg"] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
NSData *fData = UIImageJPEGRepresentation(image, 1.0);
NSLog(@"和火凤凰%@ %d", cell.imageView.image, fData.length);
}];
return cell;
}
如代码。就是加载远程图片。问题就是。页面第一次加载的时候cell里面的图片没有显示。而再执行一次reload之后,图片就显示了。如何解决?以及产生的原因?
另外,我如果使用一张本地图片,则没有这个问题