删除角度边框UIButton ios swift

时间:2016-11-01 08:03:37

标签: ios swift uibutton border

如何在所示按钮的角度周围移除此白色边框?

enter image description here

1 个答案:

答案 0 :(得分:0)

以这种方式创建按钮:

let button = UIButton(type: UIButtonType.system)
button.titleLabel?.font = UIFont.preferredFont(forTextStyle: UIFontTextStyle.body)
button.setTitleColor(UIColor.black, for: UIControlState.normal)
button.backgroundColor = UIColor.white
button.layer.cornerRadius = 4