Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我的 NSTextView 中的文本发生变化,我想触发事件。有没有办法直接从 NSTextView 触发,或者我必须为 NSTextView 创建一个自定义类?
- (void)textDidChange:(NSNotification *)notification { ----do stuff here---- NSLog(@"text typed"); }
将方法添加到您的代码中......足够了