UITextView contentInset无法在iOS 7上的UITextView中工作?

我试图设置一个UITextViewcontentInset属性。 当这样做的时候, UIEdgeInsettopvariables工作得很好。 所以[self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)]; 作品。

但分配UIEdgeInsets的任何其他variables不起作用。 只有top调整。 bottom不调整,也不right

所以[self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)]; 不会对我的textView做任何事情。

我错过了什么吗? 有任何想法吗?

在iOS 7上使用setTextContainerInset代替contentInset。

 [self.textView setTextContainerInset:UIEdgeInsetsMake(0, 50, 100, 50)];