I want a simple push button (the one with the round corners), and to add background to it. I\'ve tried 2 things:
1 - using a round button image: this is working good, un
Here's what works for me (Swift 4).
To set background color:
myButton.layer?.backgroundColor = CGColor.customSilver
To set corner radius:
myButton.layer?.cornerRadius = 3