首页 > 代码库 > IOS 退出App

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);

 

IOS 退出App