怎么去掉padding
左边UIButton
?
我已经使用以下代码创建了按钮:
let button = UIButton(...)
button.setImage(UIImage(named: "plus")?.withRenderingMode(.alwaysTemplate), for: .normal)
button.setTitle("Text", for: .normal)
button.layer.cornerRadius = 8
button.layer.backgroundColor = UIColor.red.cgColor