LoginSignup
22

More than 5 years have passed since last update.

UITextViewのpadding/余白を消す

Posted at

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

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22