title: Create a rectangle with just two rounded corners in swift?
body: <p>I need to create a rectangle that have just two rounded corners in swift (Objective C code also ok).</p>
  
  <p>At the moment my code is creating two rectangles with </p>
  
  <pre><code>CGPathCreateWithRoundedRect(CGRectMake(0, 0, 30, 60), 5, 5, nil);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>CGPathCreateWithRoundedRect(CGRectMake(0, 0, 30, 60), 0, 0, nil);
  </code></pre>
  
  <p>and merging them (to have two right angle corners and two rounded ones) but I am not happy with the code and I am pretty sure there should be much better ways to do it.</p>
  
  <p>I am new to iOS and graphical development and swift.</p>