In Xcode I've created a new Main Menu xib from the Main Menu template. It only contains the main-menu, which I would like to use in my app.

How can I load this Main Menu from this xib-file and use it in my different windows?

有帮助吗?

解决方案

You don't need to do anything.

An application's main menu is already global—it's part of the application, not of any individual window. The same menus will appear regardless of which window is active, by default.

You would have to put in some work if you wanted to go the other way and have different menus depending on which window is active.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top