按钮有四种状态
正常(默认状态)
突出显示(高亮状态)点击按钮不放
已禁用(使能状态)就是是否可用状态 - >禁用的状态才会显现
Selected(选中状态)通过selected属性设置
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let btn = UIButton() // 新建一个按钮
btn.frame = CGRect(x: 0, y: 0, width: