Created
September 7, 2017 11:00
-
-
Save michaelevensen/3d4284fa32b5e6a6eb3f806d619203eb to your computer and use it in GitHub Desktop.
Global extension to remove all padding from all UITextView's.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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