LEOTextView icon indicating copy to clipboard operation
LEOTextView copied to clipboard

Bold & Italic font not set correctly when setting textView.attributedText

Open xiaosongshu opened this issue 8 years ago • 0 comments

Have two LEOTextViews (Non-editable view and editable view).

First subclassed in Storyboard, with the ViewController written in Obj-C. Second is initiated programmatically, with the ViewController written in Swift.

Write text and set to bold / italic in the second VC (Swift) and segue back to first VC (Obj-C). All formatting copies perfectly. Then try to segue back to the second VC (Swift) to edit again, and bold & italics are reverted back to normal text. Formatting not copied for some reason...although bullet points are copying correctly, just not bold & italic, which is strange since it copied over perfectly the first time to the non-editable view.

In both cases I'm just doing textView.attributedText = otherViewController.textView.attributedText

xiaosongshu avatar Nov 03 '17 06:11 xiaosongshu