headImg = (UIImageView *)[cell.contentView viewWithTag:5];
NSURL *ImgURL = [NSURL URLWithString:cellData[@"avatar"]];
[headImg sd_setImageWithURL:ImgURL placeholderImage:[UIImage imageNamed:@"1.jpg"]];
headImg = (UIImageView *)[cell.contentView viewWithTag:5];
NSURL *ImgURL = [NSURL URLWithString:cellData[@"avatar"]];
[headImg sd_setImageWithURL:ImgURL placeholderImage:[UIImage imageNamed:@"1.jpg"]];
你是怎么安装SDWebImageView的?如果是Cocoapods应该没问题,这个问题主要是Category没加载成功,需要加上 _ObjC 的 tag ,具体看它官方文档。
2 回答1.1k 阅读
1 回答994 阅读✓ 已解决
1 回答2.7k 阅读
1 回答1.4k 阅读
1.7k 阅读
1 回答911 阅读
1 回答1.1k 阅读
这样看的话两种可能:
1.[UIImage imageNamed:@"1.jpg"]不存在
2.你的ImgURL不是正确的URL格式