UITextView 上下左右留边问题

参考
https://www.jianshu.com/p/8e2b9ef3c804

https://www.jianshu.com/p/94133c507371

contentInset UIScrollView的属性
extend the space between your content and the edges of the content view
add additional scroll area around content
content四周的区域 回弹效果

textContainerInset
Inset the text container's layout area within the text view's content area
文字容器和textView的content的区域 默认值 (8, 0, 8, 0)

textContainer
Get the text container for the text view
文字容器

lineFragmentPadding
line fragment rectangles 矩形框左右2边加的padding 默认值5.0

descText.textContainerInset = UIEdgeInsetsZero;
descText.textContainer.lineFragmentPadding = 0;

你可能感兴趣的:(UITextView 上下左右留边问题)