Check out example codes for "add buton border swift". It will help you in understanding the concepts better.

Code Example 1

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

Learn ReactJs, React Native from akashmittal.com