Created
April 4, 2020 00:47
-
-
Save niw/03777f93a6202221ed2b4dce85f601e5 to your computer and use it in GitHub Desktop.
macOS 10.15.4 Catalyst erases the underline for input method marked text if content attributed text has `.underlineStyle`.
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 textView = UITextView(frame: view.bounds) | |
| textView.autoresizingMask = [.flexibleWidth, .flexibleHeight] | |
| let text = NSMutableAttributedString(string: "test") | |
| text.addAttributes([ | |
| .font: UIFont.systemFont(ofSize: 20.0), | |
| .foregroundColor: UIColor.label, | |
| .underlineStyle: 0 | |
| ], range: NSRange(location: 0, length: text.length)) | |
| textView.attributedText = text | |
| view.addSubview(textView) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment