title: How to create an oval UIView?
body: <p>To make a circle view one must do</p>
  
  <pre><code>shapeView.layer.cornerRadius = CGFloat(width)/2.0
  </code></pre>
  
  <p>So I extended this logic to make an oval view</p>
  
  <pre><code>if width &gt;= height {
      shapeView.layer.cornerRadius = CGFloat(width)/2.0
  } else{
      shapeView.layer.cornerRadius = CGFloat(height)/2.0
  }
  </code></pre>
  
  <p>Except my oval views have pointy ends as you can see <a href="http://i.stack.imgur.com/Vdvq8.png" rel="nofollow">here.</a> </p>
  
  <p>My question is: How do I get rid of the pointy ends and make them round?</p>
  
  <hr>
  
  <p>If it's any concern I'm using:</p>
  
  <ul>
  <li>Swift 2</li>
  <li>IOS 9.2</li>
  <li>Xcode 7.2</li>
  </ul>