Search code examples
xcodecocoansmenu

Accidentally removed "edit" menu in NSMenu, now i need it back


I accidentally removed "edit" menu in the NSMenu of my OS X app. Now neither Cmd+X nor Cmd+V works.

I did not find a special 'edit' menu in the interface builder's toolbox.

What's the best way to bring back my beloved edit menu?


Solution

  • Easiest way is to create a new Main Menu template.

    Go to File->New->File...

    Select OS X -> User Interface -> Main Menu

    This will generate a new MainMenu.xib for you, which includes your edit menu. Just copy paste the edit menu view from the new file into your old MainMenu, and you're good