默认center 模式 居中
btn.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.right
right 和 trailing效果一样
======= ======= ======= ======= ======= ======= ======= ======= =======
fill
======= ======= ======= ======= ======= ======= ======= ======= =======
leading 和 left 效果一样
if #available(iOS 11.0, *) { btn.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.leading } else { // Fallback on earlier versions }
======= ======= ======= ======= ======= ======= ======= ======= =======
======= ======= ======= ======= ======= ======= ======= ======= =======
======= ======= ======= ======= ======= ======= ======= ======= =======