Change the text of a NSTextView programmatically

MatterGoal picture MatterGoal · Feb 1, 2013 · Viewed 22.8k times · Source

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 structure (with NSLayoutManager etc...), but I can't find a valid way to modify the current text value.

Answer

MatterGoal picture MatterGoal · May 12, 2013

The right method is "setString" [textView setString:@"the string"];