22
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

UITextViewのpadding/余白を消す

検索するとcontentInsetにマイナスの値を設定する方法が出てくるが、フォントが変わると値も変えないといけなさそう。
いろいろ調べた結果、このやり方で消えたのでメモ。

textView.textContainerInset = UIEdgeInsetsZero
textView.textContainer.lineFragmentPadding = 0                    

Register as a new user and use Qiita more conveniently

  1. You can follow users and tags
  2. you can stock useful information
  3. You can make editorial suggestions for articles
What you can do with signing up
22
Help us understand the problem. What are the problem?