笔记

用SDWebImage加载图片时,当图片存在汉字时,加载不出来
例如:http://img001.uubaoku.com/Images/upload/photo/197066/主图/220/20170907111837551.jpg

需要将把地址转码为utf8编码 在进行加载

    NSString *str = @"http://img001.uubaoku.com/Images/upload/photo/197066/主图/220/20170907111837551.jpg";
    NSString *url = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
   [self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:url]];

你可能感兴趣的:(笔记)