更新时间:2023-02-17 21:30:07
button.backgroundColor = UIColor.blue
或任何其他颜色:red
、green
、yellow
等
Or any other color: red
, green
, yellow
,etc.
另一个选项是 RGBA 颜色:
Another option is RGBA color:
button.backgroundColor = UIColor(red: 0.4, green: 1.0, blue: 0.2, alpha: 0.5)