Want to lose margin/padding in UITextView? The class given here, UITextViewFixed
is a usually the most reasonable solution overall.
1 2 3 4 5 6 7 8 9 10 | @IBDesignable class UITextViewFixed: UITextView { override func layoutSubviews() { super.layoutSubviews() setup() } func setup() { textContainerInset = UIEdgeInsets.zero textContainer.lineFragmentPadding = 0 } } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.