简体   繁体   English

SDWebImage不显示placeholderImage

[英]SDWebImage not show placeholderImage

i have a image link people.avatarbig: http://ws.loc.sh/images/515b9f54e4b04a5a481030f9 when you use browse to open it,you will see nothing,so SDWebImage should show placeholderImage but now it show nothing.my code : 我有一个图像链接people.avatarbig: http ://ws.loc.sh/images/515b9f54e4b04a5a481030f9当您使用浏览器打开它时,您什么也看不到,因此SDWebImage应该显示placeholderImage但现在却什么也没显示。我的代码:

 if(![GlobalVariable isBlankString:people.avatarbig])
        {
            [imageView1 setImageWithURL:[NSURL URLWithString:people.avatarbig]
                           placeholderImage:[UIImage imageNamed:@"default_user.png"]];

        }else{
            imageView1.image=[UIImage imageNamed:@"default_user.png"];
        }

why SDWebImage not show placeholderImage? 为什么SDWebImage不显示placeholderImage?

i think this is a bug so you should modify the method :NS_INLINE UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData) 我认为这是一个错误,所以您应该修改方法:NS_INLINE UIImage * SDScaledImageForPath(NSString * path,NSObject * imageOrData)

the correct is : 正确的是:

if (image &&[[UIScreen mainScreen] respondsToSelector:@selector(scale)])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM