UITextView contentInset not working in UITextView on iOS 7?

I am trying to set the UITextView contentInset property. In this case, the variable UIEdgeInset top working fine. So, [self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)]; works.

But assigning any other variable to UIEdgeInsets does not work. Only top adjustable. bottom not adjustable, do not left or right .

So, [self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)]; does nothing for my textView.

Am I missing something? Any ideas?

+6
ios ios7 uitextview uiedgeinsets
Oct 05 '13 at 22:41
source share
1 answer

Use setTextContainerInset instead of contentInset on iOS 7.

 [self.textView setTextContainerInset:UIEdgeInsetsMake(0, 50, 100, 50)]; 
+12
Oct 22 '13 at 21:30
source share