How can I get mouse events f开发者_运维问答or NSWindow? I want to know when a use hovers over a window and clicks a window. Thanks.
Use the following methods:
- (void)mouseDown:(NSEvent *)theEvent {
}
- (void)mouseUp:(NSEvent *)theEvent {
}
- (void)mouseMoved:(NSEvent *)theEvent {
}
精彩评论