首页 > 其他 > 详细

退出当前应用程序

时间:2017-04-10 12:25:39      阅读:170      评论:0      收藏:0      [点我收藏+]
/*
 *退出当前应用程序
 */
+ (void)exitApp;
+ (void)exitApp{
   
    UIWindow *window = [[UIApplication sharedApplication].delegate window];
    //添加动画
    [UIView animateWithDuration:2.0f animations:^{
        window.alpha = 0;
    } completion:^(BOOL finished){
       
        if (finished){
           
            //exit(0):为0时正常运行程序并推出,非0时非正常运行导致程序退出。
            exit(0);
        }
       
    }];
    
}
 

退出当前应用程序

原文:http://www.cnblogs.com/iQingYang/p/6688379.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!