I'm trying to add a left margin to a UITextView.
I've tried setting the property contentInset, see below:
UITextView *textView = [[UITextView alloc] initWithFrame: CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
textView.editable = YES;
textView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
textView.backgroundColor = [UIColor clearColor];
textView.opaque = NO;
textView.contentInset = UIEdgeInsetsMake(0, 15.0f, 0, 0);
This seems to work though it causes horizontal scrolling on the TextView which I don't want.
I just want the text inset on the left without making the textview any wider.