Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add Main Menu to xib

Tags:

xcode

cocoa

xib

I deleted main menu from my xib file. How can I recreate it without coping it from another freshly created xib?

I can't seem find how to tell IB that menu that I add from object library is actually main application menu.

like image 985
ssoldatenkov Avatar asked Jan 04 '12 21:01

ssoldatenkov


Video Answer


1 Answers

You can't. You used to be able to simply connect the mainMenu outlet to your menu, but as of Xcode 4, there is no mainMenu outlet and there is no replacement way to create a Main Menu in an existing nib.

You must create a new MainMenu nib using the New File command and either copy the Main Menu object from that nib or just replace the old nib with the new.

like image 94
Peter Hosey Avatar answered Sep 27 '22 21:09

Peter Hosey