quit on close
This is to make the application automatically quit when the user closes the last window, as opposed to requiring the user to still select quit from the menu when nothing is left on the screen
- make a class (such as MyAppController) the delegate of File's Owner in Interface Builder
- override the following method as shown:
//--------- Application Delegate Methods ---------// // this causes the application to quit after the window is closed // (after connecting AppController to "File's Owner" as a delegate - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; }