如何删除左侧padding
从UIButton
?如何从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
简单的button.setTitle(“+ Text”)是否有效? (又名,没有嵌入真实图像) – Vexy