UITextView contentInset无法在iOS 7上的UITextView中工作?
我试图设置一个UITextView
的contentInset
属性。 当这样做的时候, UIEdgeInset
的top
variables工作得很好。 所以[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)];