UITableViewCell 使用 SDWebImage 后图片显示不正常
主要代码如下:
viewController代码:
-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString * cellId = @"ROCKTableViewCell";
ROCKTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellId];
if( !cell )
{
cell = [[[NSBundle mainBundle] loadNibNamed:cellId owner:self options:nil] lastObject];
}
[cell refresh:_array[indexPath.row]];
return cell;
}
///ROCKTableViewCell 代码
-(void)refresh:(NSString*)url
{
[self.imageView sd_setImageWithURL:[NSURL URLWithString:url]];
}
现在出现的情况是,要滚动uitableview或者点击 viewCell才能显示图片,请问这个是为什么?