- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
CommonTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"article_Cell" forIndexPath:indexPath];
ArticleEntity *article = self.articleArray[indexPath.row];
cell.titleLabel.text = article.title;
cell.timeLabel.text = article.date;
[cell.imageV sd_setImageWithURL:[NSURL URLWithString:article.image] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
cell.imageV.alpha = 0.0;
[UIView transitionWithView:cell.imageV
duration:1.0
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
[cell.imageV setImage:image];
cell.imageV.alpha = 1.0;
} completion:NULL];
}];
return cell;
}
使用sdWebImage实现对tableView的cell加载图片淡入淡出效果
最新推荐文章于 2024-04-18 10:12:42 发布