我正在为tvOS创建应用程序。我试图设置一个UIButton的颜色,但不知道如何得到我的权利。如何在Swift中设置UIButton类型的颜色:.system for tvOS
var buttonA: UIButton(type: .system)
var buttonB: UIButton(type: .system)
...
buttonA.backgroundColor = UIColor.green
buttonB.backgroundColor = UIColor.red
我很高兴的结果,当按钮处于焦点,但是当按钮没有焦点,我得到一个丑陋的结果。绿色按钮有一个缺少角落半径的彩色图层。
如何正确颜色的按钮?