As the pic above,I want to make the text left-aligned with the label,how to do that?
如上图所示,我想让文字与标签左对齐,怎么做?
1 个解决方案
#1
You can set edge insect for text container. Here is the line of code
您可以为文本容器设置边缘昆虫。这是代码行
[textView setTextContainerInset:UIEdgeInsetsMake(0, 10, 0, 0)];
[textView setTextContainerInset:UIEdgeInsetsMake(0,10,0,0)];
Or you can use property 'setContentInset' to set the margin as suggested above.
或者您可以使用属性'setContentInset'来设置上面建议的边距。
#1
You can set edge insect for text container. Here is the line of code
您可以为文本容器设置边缘昆虫。这是代码行
[textView setTextContainerInset:UIEdgeInsetsMake(0, 10, 0, 0)];
[textView setTextContainerInset:UIEdgeInsetsMake(0,10,0,0)];
Or you can use property 'setContentInset' to set the margin as suggested above.
或者您可以使用属性'setContentInset'来设置上面建议的边距。