2012-09-05 3 views
1

내가 사용하여 런타임에 문서 윈도우의 프록시 아이콘을 변경하려고변경 아이콘

[[[자기 창] standardWindowButton : NSWindowDocumentIconButton] setImage : IMG]

이것은 실행되고 있지만 info.plist의 설정이이를 무시하고 있습니다.

적절한 장소는 무엇입니까? 당신의 NSWindow 서브 클래스 재정의 setRepresentedURL에서

답변

1

는 다음과 같이

- (void)setRepresentedURL:(NSURL *)url 
{ 
    [super setRepresentedURL:url]; 
    NSImage* img = ... 
    [[self standardWindowButton:NSWindowDocumentIconButton] setImage:img]; 
}