gpt4 book ai didi

objective-c - NSWindow 鼠标事件

转载 作者:行者123 更新时间:2023-12-03 16:19:01 24 4
gpt4 key购买 nike

如何获取 NSWindow 的鼠标事件?我想知道用户何时将鼠标悬停在窗口上并单击窗口。谢谢。

最佳答案

使用以下方法:

- (void)mouseDown:(NSEvent *)theEvent {

}

- (void)mouseUp:(NSEvent *)theEvent {

}

- (void)mouseMoved:(NSEvent *)theEvent {

}

关于objective-c - NSWindow 鼠标事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5610394/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com