I am using the following code to achieve the top right and left corner for my main UIView:
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.view.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(10.0, 10.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.view.bounds;
maskLayer.path = maskPath.CGPath;
[maskLayer setMasksToBounds:YES];
self.view.layer.mask = maskLayer;
But after that, all subviews like UIButtons contained in the UIView stop working. I think this could be a no brainer, but I just couldn't get the solution after much of the googling work.
Thanks in advance.
Cheers.