I'm trying to close an app when I click a button on my app. (Like an 'Exit' button)
In my controller.h, I have created this
Code:
- (IBAction) exitApp : (NSButton*) sender;
In my controller.m,
Code:
- (IBAction) exitApp : (NSButton*) sender {
// what should I write inside to close an app on click of a button ?
}
Can someone please help?
EDIT:
Never mind, found it out myself :-)
Code:
[NSApp terminate:self]
will do nicely.