我从cellForRowAtIndexPath
里面的表格视图中加载了一些来自互联网的图片。这里是我的代码:使用SDWebImage时表格视图滚动滞后
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *MyIdentifier = @"ArticleCell";
ArticleCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
Article *article = [parser items][indexPath.row];
cell.title.text = article.title;
cell.newsDescription.text = article.description;
[cell.image setImageWithURL:[NSURL URLWithString:article.image]];
return cell;
}
我的问题是,即使我用SDWebImage
,当我向下滚动,我的应用程序仍然落后。下面是一些截图来自Instruments
:
图像有多大? – Wain
好吧,介于50.000和200.000之间,可以说150 KB – Kobe
图像是什么类型? TIFF? – Wain