How do I change the button background color in Swift 4?
How do I change the button background color in Swift 4? Add a button on your storyboard, select it Go to it's attribute inspector and select 'Background' property to choose the color. How do I change the button background in Xcode? 3 Answers. Just scroll a little bit in Attribute Inspector , you can find Background property in view section that will allow you set the backgroundColor for the UIButton . If you want to set backgroundColor of button programatically. How do I change the color of a button in Swift? backgroundColor = UIColor. grayColor() with button. backgroundColor = UIColor(red:...