我正在尝试设置一个UITextView
's contentInset
财产。这样做时,UIEdgeInset
's top
变量工作得很好。所以[self.textView setContentInset: 'UIEdgeInsetsMake(50, 0, 0, 0)];
works.
但是分配 UIEdgeInsets 的任何其他变量都不起作用。只有top
调整。bottom
不调整,也不调整left
or right
.
So [self.textView setContentInset: UIEdgeInsetsMake(0, 50, 100, 50)];
对我的 textView 没有做任何事情。
我错过了什么吗?有任何想法吗?
在 iOS 7 上使用 setTextContainerInset 而不是 contentInset。
[self.textView setTextContainerInset:UIEdgeInsetsMake(0, 50, 100, 50)];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)