MatterGoal MatterGoal - 3 months ago 16
Objective-C Question

Change the text of a NSTextView programmatically

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

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