I am new to the swift language. Can someone tell me how to change the background color of a button using the swift language?
button.backgroundColor = UIColor.blue
Or any other color: red, green, yellow ,etc.
red
green
yellow
Another option is RGBA color:
button.backgroundColor = UIColor(red: 0.4, green: 1.0, blue: 0.2, alpha: 0.5)
1.4m articles
1.4m replys
5 comments
57.0k users