IOS 退出程序APP代码

来源:互联网 发布:国信优易数据有限公司 编辑:程序博客网 时间:2024/05/16 00:24

//退出APP的方法

- (void)exitApplication {

    AppDelegate *app = [UIApplicationsharedApplication].delegate;

   UIWindow *window = app.window;

    [UIViewanimateWithDuration:1.0fanimations:^{

        window.alpha =0;

        window.frame =CGRectMake(0, window.bounds.size.width,0, 0);

    }completion:^(BOOL finished) {

       exit(0);

    }];

}

0 0
原创粉丝点击