Objective c 在情节提要中显示文本(字符串)
我想在序列图像板文件中的NSTextView输出中显示一些文本字符串,但它不起作用。我不确定我是否使用了最好的方法。所选的insertText方法是否正确?插座连接正确吗?故事板是否支持NSTextView类 非常感谢您的帮助Objective c 在情节提要中显示文本(字符串),objective-c,storyboard,nstextview,outlet,Objective C,Storyboard,Nstextview,Outlet,我想在序列图像板文件中的NSTextView输出中显示一些文本字符串,但它不起作用。我不确定我是否使用了最好的方法。所选的insertText方法是否正确?插座连接正确吗?故事板是否支持NSTextView类 非常感谢您的帮助 ViewController.h @interface ViewController : NSViewController @property (unsafe_unretained) IBOutlet NSTextView *closerText; @end View
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
确保NSTextView已连接到closerText IBOutlet。insertText是正确的函数