add buton border swift

Swift
button.layer.borderWidth = 1
button.layer.borderColor = UIColor.black.cgColor
Source

Also in Swift: