title: How to set cornerRadius for only top-left and top-right corner of a UIView?
body: <p>Is there a way to set <code>cornerRadius</code> for only top-left and top-right corner of a <code>UIView</code>?</p>
  
  <p>I tried the following, but it end up not seeing the view anymore.</p>
  
  <pre><code>UIView *view = [[UIView alloc] initWithFrame:frame];
  
  CALayer *layer = [CALayer layer];
  UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRoundedRect:frame byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadii:CGSizeMake(3.0, 3.0)];
  layer.shadowPath = shadowPath.CGPath;
  view.layer.mask = layer;
  </code></pre>