IOS 退出App

 UIApplication *app = [UIApplication sharedApplication];
 [app performSelector:@selector(suspend)];
 //wait 2 seconds while app is going background
 [NSThread sleepForTimeInterval:2.0];
 //exit app when app is in background
 NSLog(@"exit(0)");
 exit(0);

 

posted @ 2014-09-04 09:28  菜鸟程序猿  阅读(302)  评论(0编辑  收藏  举报