title: UICollectionView cell with constant heigh and dynamic width depending on UIImageView width
body: <p>How can I set the collection view cell width depending on image view. I have tried with the give code below but the width is same for all cell. I have set the height constraint of image view as 100 and width constrain &gt;= 50 and content mode as aspect fit.
  <code>if let flowLayout = itemOfferCollectionView.collectionViewLayout as? UICollectionViewFlowLayout { flowLayout.estimatedItemSize = UICollectionViewFlowLayout.automaticSize }</code></p>