UITextView offsets text differently than UILabel

前端 未结 1 1168
温柔的废话
温柔的废话 2021-02-14 00:53

I am using UILabel and UITextView and they render text differently. It seems that UITextView offsets text by 4.

Below is an example where at t

相关标签:
1条回答
  • 2021-02-14 01:21

    This works for me and eliminates the inner padding:

    textView.textContainer.lineFragmentPadding = 0;
    textView.textContainerInset = UIEdgeInsetsZero;
    
    0 讨论(0)
提交回复
热议问题