I have an NSTextView that I bind to a String. The NSTextView has isRichText set to false. The text is editable by the user.
I want to update the font and line-hieght dynamically. Setting the font with textView.font works at any time.
I only seem to be able to set the paragraph style, for the line-height before the binding is in place. After that the same code has no effect on the text layout.
I am using the following code:
let paragraphStyle = NSParagraphStyle.default.mutableCopy() as! NSMutableParagraphStyle
paragraphStyle.lineHeightMultiple = style.lineHeightMultiple
editableText.defaultParagraphStyle = paragraphStyle
Can anybody help me with what I am doing wrong? Thank you.