SDWebImage加载https图片失败

2022-07-13  本文已影响0人  唐人街的乞丐

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

/**
 * 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];
上一篇 下一篇

猜你喜欢

热点阅读