Created
August 17, 2013 15:06
-
-
Save troyharris/6257332 to your computer and use it in GitHub Desktop.
iOS 7 fix for invisible UITextView text
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
/* Sometimes in iOS 7, a UITextView will be invisible until the user starts editing it or | |
the keyboard appears. Adding this somewhere after setup will fix this issue (either viewDidLoad or viewDidLayoutSubviews) | |
*/ | |
[self.textView.layoutManager ensureLayoutForTextContainer:self.textView.textContainer]; |
Me either, in viewDidLoad it does not work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've got a couple of UITextViews inside of a UIStackView of a Swift 3 project in Xcode 8. That line in
viewDidLayoutSubviews
&viewDidLoad
didn't seem to do anything.