headImg = (UIImageView *)[cell.contentView viewWithTag:5]; NSURL *ImgURL = [NSURL URLWithString:cellData[@"avatar"]]; [headImg sd_setImageWithURL:ImgURL placeholderImage:[UIImage imageNamed:@"1.jpg"]];
认证0级讲师
Looking at it this way, there are two possibilities: 1.[UIImage imageNamed:@"1.jpg"] does not exist 2. Your ImgURL is not the correct URL format
In UIImageView, the method sd_setImageWithURL cannot be found.
The sd_setImageWithURL series of methods are in UIImageView+WebCache.h in SDWebImage. You need to import this header file
How did you install SDWebImageView? If it is Cocoapods, there should be no problem. The main problem is that the Category is not loaded successfully. You need to add the _ObjC tag. See its official documentation for details.
project --> build settings --> Other Linker Flags Add -Objc
After adding -ObjC, it still looks like this...
When dragging files in, for the second added folder, select the first one “creat groups!” Do not select the second one “creat folder references”
Looking at it this way, there are two possibilities:
1.[UIImage imageNamed:@"1.jpg"] does not exist
2. Your ImgURL is not the correct URL format
In UIImageView, the method sd_setImageWithURL cannot be found.
The sd_setImageWithURL series of methods are in UIImageView+WebCache.h in SDWebImage. You need to import this header file
How did you install SDWebImageView? If it is Cocoapods, there should be no problem. The main problem is that the Category is not loaded successfully. You need to add the _ObjC tag. See its official documentation for details.
project --> build settings --> Other Linker Flags Add -Objc
After adding -ObjC, it still looks like this...
When dragging files in, for the second added folder, select the first one “creat groups!” Do not select the second one “creat folder references”