title: how to resize dowloaded Image with SDWebImage?
body: <p>I'm using <a href="https://github.com/rs/SDWebImage" rel="nofollow noreferrer">SDWebImage</a> to download images async into UICollectionView cells, but the downloaded images didn't fit the cell, where the cell only shows the upper corner of the image.</p>
  
  <p>this is my code :</p>
  
  <pre><code>override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) as! ImageCell
  
      cell.imageView.setShowActivityIndicator(true)
      cell.imageView.setIndicatorStyle(.gray)
      cell.imageView.sd_setImage(with: URL(string: imageURL[indexPath.row]))
  
      return cell
  }
  </code></pre>
  
  <p>and this's my cellClass :</p>
  
  <pre><code>private class ImageCell: UICollectionViewCell {
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      self.setupViews()
  }
  required init?(coder aDecoder: NSCoder) {
      fatalError("init(coder:) has not been implemented")
  }
  
  let imageView: UIImageView = {
      let imageView = UIImageView()
      imageView.backgroundColor = .white
      imageView.layer.masksToBounds = true
      return imageView
  }()
  
  func setupViews() {
      backgroundColor = .white
      addSubview(imageView)
      imageView.contentMode = .scaleAspectFit
      imageView.translatesAutoresizingMaskIntoConstraints = false
      imageView.frame = CGRect(x: 0, y: 0, width: frame.width , height: frame.width )
  
  }
  }
  </code></pre>
  
  <p>I had followed this link <a href="https://stackoverflow.com/questions/23121663/resize-uicollectionview-cells-after-image-inside-has-been-downloaded">Resize UICollectionView cells after image inside has been downloaded</a> to solve it, but nothing changes.</p>
  
  <p>So any ideas ?  </p>