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);
原文地址:https://www.cnblogs.com/joesen/p/3955350.html