方法一:
// 退出应用程序
- (void)exitApplication{
AppDelegate *app = (AppDelegate*)[UIApplication sharedApplication].delegate;
UIWindow *window = app.window;
[UIView animateWithDuration:0.4f animations:^{
CGAffineTransform curent = window.transform;
CGAffineTransform scale = CGAffineTransformScale(curent, 0.1,0.1);
[window setTransform:scale];
} completion:^(BOOL finished) {
exit(0);
}];
}
方法二:
[[UIApplication sharedApplication] terminateWithSuccess];