1
我试图在系统运行时更改文档窗口的代理图标更改图标
[[[自我窗口] standardWindowButton:NSWindowDocumentIconButton] setImage:IMG]。
这是得到执行,但在info.plist中的设置重写此。
什么是正确的地方称此。
我试图在系统运行时更改文档窗口的代理图标更改图标
[[[自我窗口] standardWindowButton:NSWindowDocumentIconButton] setImage:IMG]。
这是得到执行,但在info.plist中的设置重写此。
什么是正确的地方称此。
在你NSWindow
子类中重写setRepresentedURL
如下:
- (void)setRepresentedURL:(NSURL *)url
{
[super setRepresentedURL:url];
NSImage* img = ...
[[self standardWindowButton:NSWindowDocumentIconButton] setImage:img];
}