Skip to content

Instantly share code, notes, and snippets.

@michaelevensen
Created August 2, 2017 12:45
Show Gist options
  • Save michaelevensen/00376398d8e5dc4712595840ce18e69b to your computer and use it in GitHub Desktop.
Save michaelevensen/00376398d8e5dc4712595840ce18e69b to your computer and use it in GitHub Desktop.
UITextView IBDesignable for removing inner padding
@IBDesignable class UITextViewFixed: UITextView {
override func layoutSubviews() {
super.layoutSubviews()
setup()
}
func setup() {
textContainerInset = UIEdgeInsets.zero
textContainer.lineFragmentPadding = 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment