使用SDWebImage的IOS未提供setImageWithURL方法错误

使用SDWebImage的IOS未提供setImageWithURL方法错误,ios,uiimageview,sdwebimage,Ios,Uiimageview,Sdwebimage,您好,我正在尝试将SDWebImage库用于我的项目。我复制了所有的文件。我已经导入了#导入“UIImageView+WebCache.h”,但是当我尝试使用 [cell.mediaImg setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder.png"]];

您好,我正在尝试将SDWebImage库用于我的项目。我复制了所有的文件。我已经导入了
#导入“UIImageView+WebCache.h”
,但是当我尝试使用

[cell.mediaImg setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
               placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
这给了我错误

No visible @interface for 'UIImageView' declares the selector 'setImageWithURL:placeholderImage:'
所以我做错了什么。还有什么我必须使用的东西。我需要一些帮助。谢谢。

他们已经弃用了

[cell.mediaImg setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
               placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
使用

和更新sdwebimage文件

它们已弃用

[cell.mediaImg setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
               placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
使用


和更新sdwebimage文件

地狱之人我花了2到3个小时才弄明白。我认为我没有正确地导入它。谢谢你节省了一天的时间。这样愚蠢的错误。谢谢。该死的,我花了2到3个小时才弄明白。我认为我没有正确地导入它。谢谢你节省了一天的时间。这样愚蠢的错误。非常感谢。