How would I do this using Objective C and cocoa using Xcode? I am trying to insert a string at the cursor or user selection on the click of a button.
views:
40answers:
1
+4
A:
NSTextView has a method -insertText: which does what you want:
[myTextView insertText:@"hello world"];
The method accepts either an NSString or an NSAttributedString.
dwineman
2010-10-30 06:15:44