Ultimate Catalyst Guide

How do I add a `New Window` entry to a custom MainMenu?

released Fri, 05 Jul 2019
Swift Version 5.1

Once you modify your Main Menu, you will find that the entry to create a new window has suddenly disappeared. That happens because the New Window entry is dynamicaly inserted by UIKit depending on whether your app supports multiple windows (or not).

In order to support this again, you have to do the following:

  1. Create a new UICommand in your Storyboard for the New Window entry.
  2. Assign the title and your desired shortcut (probably Command + N).
  3. Select the First Responder in your MainMenu Scene

  1. Switch to the Attributes Inspector (from the inspectors on the right)
  2. There, you will find an empty list named "User Defined"
  3. Add a new entry to this list with the following attributes:
  4. Action: requestNewScene:, Type: id (the default)
  5. Finally, drag from your UICommand menu entry to the First Responder and select the newly created action.