I am trying to set the custom border color of UIView programmatically in Swift.
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