SDWebImage加载https图片失败

SDWebImage 加载https图片失败,去掉 “s”,加载http图片正常显示

解决办法

/**
 * Set the imageView `image` with an `url`, placeholder and custom options.
 *
 * The download is asynchronous and cached.
 *
 * @param url         The url for the image.
 * @param placeholder The image to be set initially, until the image request finishes.
 * @param options     The options to use when downloading the image. @see SDWebImageOptions for the possible values.
 */
// 设置  options:SDWebImageAllowInvalidSSLCertificates
- (void)sd_setImageWithURL:(nullable NSURL *)url
          placeholderImage:(nullable UIImage *)placeholder
                   options:(SDWebImageOptions)options NS_REFINED_FOR_SWIFT;
// 使用方法
   [imageView sd_setImageWithURL:[NSURL URLWithString:cellModel.picUrl] placeholderImage:[UIImage imageNamed:@"placeholder"] options:SDWebImageAllowInvalidSSLCertificates];

你可能感兴趣的:(SDWebImage加载https图片失败)