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.
您好,我正在编写一个包含多个 nsbuttons 的 mac os x 应用程序。每个 nsbutton 都有自己的图像。当您按下 ns 按钮时,图像会发生变化。更改 nsbutton 上的图像时是否有添加动画的选项?
您可以继承 nsbutton 并且可以在需要更改图像时使用按钮的视图层来制作动画。NSButton 也是 NSView 的子类,因此它也将具有代理动画对象,但在这种情况下,我猜整个按钮可能会被动画化,而不仅仅是你想要的图像。希望能帮助到你