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.
我想在 NSMatrix 中跟踪 NSCell 的鼠标悬停事件。文件说我可以将 NSMatrix 模式设置为NSTrackModeMatrix,当鼠标在单元格范围内时,单元格将被发送消息trackMouse:inRect:ofView:untilMouseUp:,但是只有当我单击单元格时,此消息才会发送到单元格。我误解了文档?如果是这样,我可以用另一种方法来跟踪鼠标悬停事件吗?
NSTrackModeMatrix
trackMouse:inRect:ofView:untilMouseUp:
谢谢
尝试 mouseEntered:、mouseMoved:、mouseMoved: 等。