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.
在 NSTableView 我有 NSTableRowView 并且在这一行有一些 NSImageView 子视图。问题:如何跟踪此图像上的点击事件?
您需要创建NSImageView子类来处理鼠标事件。但NSTableView不允许处理-[NSImageView mouseUp:]和其他鼠标消息。(我认为这与表格如何处理选择有关)。
NSImageView
NSTableView
-[NSImageView mouseUp:]
在这种情况下,我不得不使用无边框的“Bevel - Switch”按钮来处理点击。