Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

harihb

macrumors newbie
Original poster
Jan 24, 2011
1
0
I'm very much new to the world of cocoa, and I'm trying out small programs to get the hang of the mvc concept. Right now, I'm trying to close an app when I click a button on my app. Like having an 'Exit' button on your app.

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? :)
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.