how to set cornerRadius for RoundedRectagle only bottom-left,bottom-right of a UIButton?
<p>I tried to set button bottom rounded rectangle. But they apply only Right of bottom.</p>

<p>I want bothside bottom of button has rounded rectangle.
This is my code:</p>

<pre><code>UIBezierPath *shapePath = [UIBezierPath bezierPathWithRoundedRect:registerbtn.bounds
                                                    byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight
                                                         cornerRadii:CGSizeMake(9.0, 9.0)];

CAShapeLayer *shapeLayer = [CAShapeLayer layer];
shapeLayer.frame = registerbtn.bounds;
shapeLayer.path = shapePath.CGPath;    
[registerbtn.layer addSublayer:shapeLayer];
</code></pre>

<p><strong>Output:</strong></p>

<p><a href="https://i.stack.imgur.com/LBTHU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LBTHU.png" alt="enter image description here"></a></p>