我正在尝试在 Cocoa 应用程序中使图像成为按钮(NSButton),下面是我尝试使用的代码:
[mrButton setImage:(NSImage *)@"button.jpg"];
我已将 mrButton 链接到界面生成器中的 NSButton,并且我的 Xcode 项目中有一个名为 button.jpg 的文件,我想知道如何更正此代码或将 NSButton 制作为图像。
提前致谢!
我正在尝试在 Cocoa 应用程序中使图像成为按钮(NSButton),下面是我尝试使用的代码:
[mrButton setImage:(NSImage *)@"button.jpg"];
我已将 mrButton 链接到界面生成器中的 NSButton,并且我的 Xcode 项目中有一个名为 button.jpg 的文件,我想知道如何更正此代码或将 NSButton 制作为图像。
提前致谢!