title: Rounded UIView using CALayers - only some corners - How?
body: <p>In my application - there are four buttons named as follows:</p>
  
  <ul>
  <li>Top - left</li>
  <li>Bottom - left</li>
  <li>Top - right</li>
  <li>Bottom - right</li>
  </ul>
  
  <p>Above the buttons there is an image view (or a UIView).</p>
  
  <p>Now, suppose a user taps on - top - left button. Above image / view should be rounded at that particular corner.</p>
  
  <p>I am having some difficulty in applying rounded corners to the UIView.</p>
  
  <p>Right now I am using the following code to apply the rounded corners to each view:</p>
  
  <pre><code>    // imgVUserImg is a image view on IB.
      imgVUserImg.image=[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"any Url Here"];
      CALayer *l = [imgVUserImg layer];
      [l setMasksToBounds:YES];
      [l setCornerRadius:5.0];  
      [l setBorderWidth:2.0];
      [l setBorderColor:[[UIColor darkGrayColor] CGColor]];
  </code></pre>
  
  <p>Above code is applying the roundness to each of corners of supplied View. Instead I just wanted to apply roundness to selected corners like - top / top+left / bottom+right etc.</p>
  
  <p>Is it possible? How?</p>