How to quit cocoa app when windows close? [duplicate]

There is an optional method for the application’s delegate which will do this automatically. All you have to do is add this to the implementation. You don’t need to create an outlet or anything.

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
    return YES;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)