UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:_locaBtn.bounds byRoundingCorners:UIRectCornerTopRight|UIRectCornerBottomRight cornerRadii:CGSizeMake(10.0, 10.0)];
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = _locaBtn.bounds;
maskLayer.path = maskPath.CGPath;
_locaBtn.layer.mask = maskLayer1;
这个是给button设置了又上角和又下角设置了圆角。