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.
我想制作一种类似于 OSX 上的操作按钮的弹出按钮。我需要让按钮有两个图像构成按钮的表示(按钮的图标和旁边的向下的显示三角形)。我在想也许我可以将第二个图像添加为按钮的子视图,但似乎应该有一种更简单的方法来做到这一点。有任何想法吗?
制作一个 NSPopUpButton,其pullsDown设置为YES(IB 中的“Pull Down”类型),其图像设置为名为NSImageNameActionTemplate(IB 中的“NSActionTemplate”)的图像。
pullsDown
YES
NSImageNameActionTemplate