title: How to make Round Buttons for all screen sizes in swift?
body: <p>I know how to make perfect circle, logic is to make height and width same and set corner radius to half of width or height. In the code i did the same. and it works on SE or Iphone 5s but when i run it on larger screen devices like iphone 7, i don't get the prefect circle shape. Here is my code --</p>
  
  <pre><code>submit.layer.cornerRadius = submit.frame.width/2
  </code></pre>
  
  <p>Here is output from iPhone SE </p>
  
  <p><a href="https://i.stack.imgur.com/fVqfh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fVqfh.png" alt="enter image description here"></a></p>
  
  <p>Here is output from iPhone 7</p>
  
  <p><a href="https://i.stack.imgur.com/S8EAi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S8EAi.png" alt="enter image description here"></a></p>
  
  <p>is there any another boolean property which could be used to always keep the button round.</p>
  
  <p>Autolayout constraints
  <a href="https://i.stack.imgur.com/5K1LV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5K1LV.png" alt="enter image description here"></a></p>