Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 713
davidchambers Avatar asked Aug 18 '10 12:08

davidchambers


2 Answers

Cmd-D duplicates anything as well if you are getting tired of the drag-drop thing.
You just have to watch out that as your tags and action connections are getting duplicated too they might not be connected to the thing you wanted them to be.

like image 165
Warren Burton Avatar answered Oct 17 '22 02:10

Warren Burton


You want to drag an NSMenuItem from the library palette onto the menu:

Library Palette

You can add submenus and separators similarly.

like image 39
Barry Wark Avatar answered Oct 17 '22 01:10

Barry Wark