Does anyone know how to hide the little icon in the titlebar of a document based app window?
The docs for NSWindow say:
To customize the document icon, you can use the following code segment:
[[window standardWindowButton:NSWindowDocumentIconButton] setImage:nil];
But that doesn't work because window:stardardWindowButton:NSWindowDocumentIconButton returns nil, which, according to the docs means that the button is not in the window's view hierarchy.
I've looked around NSDocument, but that doesn't seem to refer to the icon anywhere.
I've also tried all the answers in How to show a title of document window without icon?, but they don't work. I'm guessing something has changed in Mavericks.
window
is non-nil
? – Ken Thomases