How to set the custom border color of UIView programmatically?
1 min readOct 6, 2020
--
If you Use Swift 2.0-
self.yourView.layer.borderWidth = 1
self.yourView.layer.borderColor = UIColor(red:222/255, green:225/255, blue:227/255, alpha: 1).cgColor
If you Use Swift 3.1 or latter -
self.yourView.layer.borderWidth = 1
self.yourView.layer.borderColor = UIColor(red:222/255, green:225/255, blue:227/255, alpha: 1).cgColor