Created
March 29, 2019 10:33
-
-
Save brandonasuncion/125dd8571a0343dbd4a5a062bcd2d1cc to your computer and use it in GitHub Desktop.
Using a custom NSLayoutManager
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
| let textStorage = NSTextStorage() | |
| let layoutManager = NSLayoutManager() | |
| let textContainer = NSTextContainer(size: bounds.size) | |
| layoutManager.addTextContainer(textContainer) | |
| textStorage.addLayoutManager(layoutManager) | |
| let textView = UITextView(frame: bounds, textContainer: textContainer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment