By default UITextField has a light gray color as its border color. I want to set my UITextView to have the same border color as the UITextField.
I tried:
<
For generic solution through out the project. You can extern UIView class and add these methods to it.
-(void)setBorderColor:(UIColor *)borderColor{
self.layer.borderColor = (borderColor).CGColor;
}
-(UIColor*)borderColor{
return [UIColor colorWithCGColor: self.layer.borderColor];
}
//Getter and setter for border width
-(void)setBorderWidth:(NSInteger)borderWidth{
self.layer.borderWidth = borderWidth;
}
-(NSInteger)borderWidth{
return (NSInteger)roundf((self.layer.borderWidth));
}
Its an extension to UIView. Just add these UIView+Designable.h/m files in your project and you can see the multiple more options in attribute inspector.