@IBOutlet weak var button: UIButton!
override func viewDidLoad() {
button.layer.borderWidth = 0.5
button.layer.cornerRadius = 10
button.layer.masksToBounds = true
button.layoutMargins.left = 5
//roundCorners(corners: [.bottomLeft, .bottomRight], radius: button.cornerRadius)
super.viewDidLoad()
// Do any additional setup after loading the view.
}
I have a button with cornerRadius=10
. But i need to show the top edges of the button in square shape. how can I achieve this?