title: Why UIImageView doesn't display rounded until scrolling?
body: <p>My <code>UIImageView</code> doesn't appear rounded util scrolling or reload the collection view (<code>collectionView.reloadData()</code>).</p>
  
  <p>This is how it looks:</p>
  
  <ul>
  <li>Without rounding</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/whXaQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/whXaQ.png" alt="enter image description here"></a></p>
  
  <ul>
  <li>With rounding</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/yQXMJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yQXMJ.png" alt="enter image description here"></a></p>
  
  <p>The cell has multiple image views and all of them are constrained to go with <code>facesContainer</code> UIView constrains.</p>
  
  <p>I tried to implement this code is inside <code>collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath)</code> :</p>
  
  <pre><code>cell.facesContainer.layer.cornerRadius = (cell.facesContainer.layer.frame.width/2)
  cell.facesGroupImageView.layer.cornerRadius = (cell.facesGroupImageView.layer.frame.width/2)
  cell.facesGroupImageView.layer.masksToBounds = true
  cell.facesGroupImageView.layer.borderColor = UIColor.black.cgColor
  cell.facesGroupImageView.layer.borderWidth = 0.5
  </code></pre>
  
  <p>Also, I tried to add the code snippet above in the custom cell class, at <code>awakeFromNib()</code> method, but it doesn't work.</p>
  
  <p>Why it doesn't work? how to fix it?</p>