Bordered UITextView Bordered UITextView ios ios

Bordered UITextView


#import <QuartzCore/QuartzCore.h>....// typically inside of the -(void) viewDidLoad methodself.yourUITextView.layer.borderWidth = 5.0f;self.yourUITextView.layer.borderColor = [[UIColor grayColor] CGColor];


Add the following for rounded corners:

self.yourUITextview.layer.cornerRadius = 8; 


Here's the code I used, to add a border around my TextView control named "tbComments" :

self.tbComments.layer.borderColor = [[UIColor grayColor] CGColor];self.tbComments.layer.borderWidth = 1.0;self.tbComments.layer.cornerRadius = 8;

And here's what it looks like:

enter image description here

Easy peasy.