I am using a text view as a comment composer.
In the properties inspector I can\'t find anything like a border style property so that I can make use a rounded rect,
If you want to keep your controller code clean, you can subclass UITextView like below, and change the class name in the Interface Builder.
RoundTextView.h
#import
@interface RoundTextView : UITextView
@end
RoundTextView.m
#import "RoundTextView.h"
#import
@implementation RoundTextView
-(id) initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
[self.layer setBorderColor:[[[UIColor grayColor] colorWithAlphaComponent:0.333] CGColor]];
[self.layer setBorderWidth:1.0];
self.layer.cornerRadius = 5;
self.clipsToBounds = YES;
}
return self;
}
@end