I need to close the application when the user clicks the button (I need to save IBAction to close the application). As in the games menu, we have an exit button, when we click on it, we exit the game. need.How can I do this. thanks in advance
Please see: How to programmatically exit the iPhone application?
. exit. , exit , . .
, , , "", UIApplicationExitsOnSuspend YES Info.plist. , , applicationWillTerminate: , .
UIApplicationExitsOnSuspend
YES
Info.plist
applicationWillTerminate:
exit(0); , , , exit(0); terminate iPhone. alerview , ", , ".
exit(0);
terminate
UIApplication *myapp = [UIApplication sharedApplication]; [myapp performSelector:@selector(suspend)];
, .
API, iPhone. iPhone OS "", . .
, :
[[UIApplication sharedApplication] sendAction:SIGKILL to:[UIApplication sharedApplication] from:self forEvent:nil];
. UIAlertView , .
UIAlertView
exit (0) , . - . , , - user.killing - . .