To generate rounded button with top-left & bottom left radius I use the following code:
var maskPath = UIBezierPath(roundedRect: button.bounds,
byRoundingCorners: .BottomLeft | .TopLeft,
cornerRadii: CGSizeMake(15.0, 15.0))
var shapeLayer:CAShapeLayer = CAShapeLayer()
shapeLayer.frame = self.view.bounds
shapeLayer.path = maskPath.CGPath;
button.layer.mask = shapeLayer;
button.layer.borderWidth = self.borderWidth
button.layer.borderColor = GenerateShape.UIColorFromHex(self.borderStrokeColor, alpha: (self.alphaValue-0.3)).CGColor
button.backgroundColor = GenerateShape.UIColorFromHex(self.whiteColor, alpha: (self.alphaValue-0.3))
But I get the following output:
So why top-left & bottom-left corner is invisible?? What should I do to make them visible?? Thanks.