ios 加载网络图片不显示,但是在google浏览器能显示
2019-11-28 本文已影响0人
guoguojianshu
报错的内容:Error Domain=SDWebImageErrorDomain Code=0 "Downloaded image has 0 pixels" UserInfo={NSLocalizedDescription=Downloaded image has 0 pixels
解决方法:在url后面添加这个字符串?x-oss-process=image/format,jpg
NSString * string = [NSString stringWithFormat:@"%@%@",model.url,@"?x-oss-process=image/format,jpg"];
[self.TYXWImageView sd_setImageWithURL:[NSURL URLWithString:string] placeholderImage:[UIImage imageNamed:@""]];