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.
有没有办法在鼠标进入和退出某个特定NSMenuItem而不使用自定义 NSView 时得到通知?
NSMenuItem
我尝试将 NSMenuItem 子类化并覆盖-(BOOL)isHighlighted,但它似乎不起作用。
-(BOOL)isHighlighted
你有什么提示吗?
为什么不尝试设置菜单委托并接收menu:willHighlightItem:委托调用?
menu:willHighlightItem: