UIView *viw = [[UIView alloc] initWithFrame:CGRectMake(50, 100, SELF_WIDTH - 100, SELF_WIDTH)];
viw.backgroundColor = [UIColor orangeColor];
[self.view addSubview:viw];
UIView *myCustomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0,viw.width, 120)];
myCustomView.backgroundColor = [UIColor whiteColor];
[viw addSubview:myCustomView];
UIBezierPath *bezierPath = [UIBezierPath bezierPath];
[bezierPath moveToPoint:CGPointMake(0, 0)];
[bezierPath addCurveToPoint:CGPointMake(myCustomView.width, 0) controlPoint1:CGPointMake(0, 0) controlPoint2:CGPointMake(myCustomView.width/2, 100)];
[bezierPath addLineToPoint:CGPointMake(myCustomView.width, myCustomView.height)];
[bezierPath addLineToPoint:CGPointMake(0, myCustomView.height)];
[bezierPath closePath];
CAShapeLayer *shapLayer = [CAShapeLayer layer];
shapLayer.path = bezierPath.CGPath;
myCustomView.layer.mask = shapLayer;
myCustomView.layer.masksToBounds = YES;