How can I set the title of non-main-windows in an NSDocument application?

你。 提交于 2020-02-02 11:09:12

问题


I am working on a document-based OSX application, with master-detail style windows. I understand how to open additional windows, to display additional information, by using -makeWindowControllers and adding extra window controllers, but I can't set the title of the new windows. I have tried using -setTitle and -windowTitleForDocumentDisplayName in both Document.m and in my sub-classed window controller class, but I can't get the window title to change.

How do I change the title of non-main-windows, which have a sub-classed window controller, in an NSDocument based application?

EDIT: I know there are some suggestions on SO about using an IBOutlet to the window to do this, but surely the window controller has a reference to its window anyway, right?

来源:https://stackoverflow.com/questions/27013061/how-can-i-set-the-title-of-non-main-windows-in-an-nsdocument-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!