如何获取 NSWindow 的鼠标事件?我想知道用户何时将鼠标悬停在窗口上并单击窗口。谢谢。
最佳答案
使用以下方法:
- (void)mouseDown:(NSEvent *)theEvent {
}
- (void)mouseUp:(NSEvent *)theEvent {
}
- (void)mouseMoved:(NSEvent *)theEvent {
}
关于objective-c - NSWindow 鼠标事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5610394/