// 左上和右上为圆角
UIBezierPath *cornerRadiusPath = [UIBezierPath bezierPathWithRoundedRect:self.contentBGView.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(18, 18)];
CAShapeLayer*cornerRadiusLayer = [ [CAShapeLayeralloc]init];
cornerRadiusLayer.frame=self.contentBGView.bounds;
cornerRadiusLayer.path= cornerRadiusPath.CGPath;
self.contentBGView.layer.mask= cornerRadiusLayer;