learnmac

Friday, December 09, 2005

Cocoa tip

How to create a Cocoa application that does not have a main menu but behaves like Cocoa App ?

Add LSUIElement in the Info.plist with a value of 1. That will make the application run without a menu bar.
Note : that if you have a close button on the window and you close it your app is still running and has no interface
to allow it to quit. Best is either have be it a window without close button or have it quit on close by implementing
-(BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *)theApplication