问题
Since OS X 10.11 it seems the title bar no longer appears even when using setTitle: does anyone know what happened and how to get the old behavior back?
回答1:
From the AppKit Release Notes for OS X v10.11:
In 10.11, most NSOpenPanels have adopted a design that was formerly reserved only for applications which adopted iCloud Documents support and this panel design was only used if iCloud Drive was turned on in System Preferences. This note will refer to the design as the “iCloud Open Panel Design” although the design is no longer limited to applications with iCloud Documents support.
The iCloud Open Panel Design does not feature any title appearance, therefore it seems to be gone now. I don't think there is a way back.
If you would like to display some sort of message, description or title, you might use the message
property instead.
来源:https://stackoverflow.com/questions/36879212/title-bar-missing-in-nsopenpanel