iOS 退出应用程序
退出应用程序,方法很简单,只是动画效果没有那么好。
- (void)exitApplication { AppDelegate *app = [UIApplication sharedApplication].delegate; UIWindow *window = app.window; [UIView animateWithDuration:1.0 animations:^{ window.alpha = 1; } completion:^(BOOL finished) { exit(0); }]; }