I am trying to set the custom border color of UIView programmatically in Swift.
You need to set the borderWidth from the UITextField 's layer property. Like: email. layer. borderWidth = 1 .
To set border around view component in react native we have to use borderWidth and borderColor style prop. Using the borderWidth prop we would define the border width in pixels. The borderWidth prop Number type value. The higher value we would pass the thicker border would be.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With