Skip to content

Instantly share code, notes, and snippets.

@michaelevensen
Created September 7, 2017 11:00
Show Gist options
  • Save michaelevensen/3d4284fa32b5e6a6eb3f806d619203eb to your computer and use it in GitHub Desktop.
Save michaelevensen/3d4284fa32b5e6a6eb3f806d619203eb to your computer and use it in GitHub Desktop.
Global extension to remove all padding from all UITextView's.
/// Global extension to remove all padding from all UITextView's.
extension UITextView {
open override func setNeedsDisplay() {
super.setNeedsDisplay()
textContainerInset = UIEdgeInsets.zero
textContainer.lineFragmentPadding = 0
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment