移除角边框 UIButton ios swift

Remove angle border UIButton ios swift

如何去除显示按钮中角周围的白色边框?

以这种方式创建按钮:

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