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
Simple 3 line function.
@IBOutlet weak var button: UIButton! func setButton(color: UIColor, title: String) { button.backgroundColor = color button.setTitle(title, forState: .Normal) button.layer.cornerRadius = 8.0 }
and call it like such
setButton(UIColor.redColor(), title: "Hello")