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.
Helo 专家,如何在可可中向工具提示添加按钮操作等操作事件,当我单击工具提示时,我想执行一些操作。在可可中是否可能?如果有人可以帮助如何做到这一点。
我正在使用 NSStatusItem 显示工具提示
提前致谢。
//tooltip is your NSStatusItem [tooltip setAction:@selector(tooltipClicked:)];
单击时调用方法tooltipClicked:
tooltipClicked
- (void)tooltipClicked:(id)sender { ... }