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