UIBezierPath doesn't work in TopRight corner and BottomRight corner : <p>I want to round my right corners, but only works for Left corners</p>

<pre><code>let path = UIBezierPath(roundedRect: view.bounds, byRoundingCorners: [UIRectCorner.TopLeft, UIRectCorner.TopRight], cornerRadii: CGSizeMake(20.0, 20.0))
let maskLayer = CAShapeLayer()
    maskLayer.path = path.CGPath
    view.layer.mask = maskLayer
    view.layer.masksToBounds = true
</code></pre>
