Macos NSTextView:如何子类化、重写-mouseDown并仍然能够选择文本?
我子类化了Macos NSTextView:如何子类化、重写-mouseDown并仍然能够选择文本?,macos,cocoa,mouseevent,nstextview,Macos,Cocoa,Mouseevent,Nstextview,我子类化了NSTextView。.m非常简单和简短: @implementation MyTextView - (void)mouseDown:(NSEvent *)theEvent { NSLog(@"click") ; } @end 但是现在,我不能再在MyTextView中选择文本了。我怎样才能解决这个问题呢?呼叫[超级鼠标关闭:theEvent]
NSTextView
。.m
非常简单和简短:
@implementation MyTextView
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"click") ;
}
@end
但是现在,我不能再在MyTextView中选择文本了。我怎样才能解决这个问题呢?呼叫[超级鼠标关闭:theEvent]