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.
菜单栏应用程序图标是否可以通过将其悬停在图标上来接收文本?在将内容拖放到图标上之前,我需要知道内容中有多少个字符。如果内容中有太多字符,我希望光标上的绿色圆圈变为红色。这可能吗?我会用什么方法来完成这个?我在文档页面上找不到任何有用的东西。
是NSDraggingInfo为 提供的,因此即使在放置发生之前-draggingEntered:,您也可以访问包含对象。draggingPasteboard
NSDraggingInfo
-draggingEntered:
draggingPasteboard
至于更改光标,您需要自己提供。看看NSCursor文档。
NSCursor