title: How to correctly set a circle imageView with Swift?
body: <p>im trying to make a circle imageprofile, like the profile image of instagram/whatsapp. Right now my code seems to work, but i did it in 2 different ways and both works, so i want to know which one is the best</p>
  
  <p><strong>First way:</strong></p>
  
  <pre><code>profileImageView.layer.cornerRadius = profileImageView.frame.width / 2
  profileImageView.clipsToBounds = true
  </code></pre>
  
  <p><strong>Second way</strong></p>
  
  <pre><code>profileImageView.layer.cornerRadius = profileImageView.frame.width / 2
  profileImageView.layer.masksToBounds = true
  </code></pre>
  
  <p>Also i would like if someone can explain me about "clipToBounds" and "maskToBounds", what they do. Thanks!</p>