I want to display some text (string) in a NSTextView Outlet in a storyboard file, but it does not work. I am not sure if I used the best approach. Is the selected method "insertText" the correct one? is the outlet connection correct? Does the storyboard support the NSTextView class?
Any help is much appreciated.
ViewController.h
@interface ViewController : NSViewController
@property (unsafe_unretained) IBOutlet NSTextView *closerText;
@end
ViewController.c
@implementation ViewController
@synthesize closerText;
- (void)viewDidLoad {
[super viewDidLoad];
[closerText insertText:@"Hello World"];
}
@end
make sure the NSTextView is connected to the closerText IBOutlet. insertText is the correct function.