应用直接退出

应用直接退出

代码快

- (void)exitApplication {

    AppDelegate *app = [UIApplication sharedApplication].delegate;
    UIWindow *window = app.window;

    [UIView animateWithDuration:1.0f animations:^{
        window.alpha = 0;
    } completion:^(BOOL finished) {
        exit(0);
    }];
}

你可能感兴趣的:(移动开发,iOS)