Change the text of a NSTextView programmatically

前端 未结 6 585
清歌不尽
清歌不尽 2020-12-30 23:22

I can\'t find any parameter that seems to be related with the text value showed in a NSTextView. I understood that a NSTextView uses a complex stru

6条回答
  •  无人及你
    2020-12-31 00:10

    If you want to set attributed text (formatted text) them try

    [myTextView setAttributedString:(NSAttributedString*)attrString].
    

    NSTextView contains a NSTextStorage object that actually holds the text...

提交回复
热议问题