xcodeinterface-builder

How does one add additional items to NSMenu in Interface Builder?


I'm using Xcode for the first time. I've been following a tutorial, and I'm completely stumped by something that's surely trivial. I've dragged a "Menu" from the Library into my "MainMenu.xib" window. Double-clicking this menu makes it appear.

Default NSMenu in Interface Builder

No trouble thus far. Editing the three items is intuitive, as is deleting items. How on earth do I add an item to this menu, though?


Solution

  • You want to drag an NSMenuItem from the library palette (View > Show Library) onto the menu:

    Library Palette

    You can add submenus and separators similarly.