I\'m using this code to make 2 corners of a button rounded.
let buttonPath = UIBezierPath(roundedRect: button.bounds,
byRoundingCo
Swift 2:
let buttonPath = UIBezierPath(roundedRect: button.bounds,
byRoundingCorners: [.TopLeft , .BottomLeft],
cornerRadii: CGSizeMake(1.0, 1.0))
Swift 3 and Swift 4:
let buttonPath = UIBezierPath(roundedRect: button.bounds,
byRoundingCorners: [.topLeft ,.bottomLeft],
cornerRadii: CGSize(width:1.0, height:1.0))