首页 > 移动平台 > 详细

iOS程序的退出

时间:2015-04-13 14:38:19      阅读:132      评论:0      收藏:0      [点我收藏+]
- (void)exitApplication {
 
    [UIView beginAnimations:@"exitApplication" context:nil];
 
    [UIView setAnimationDuration:0.5];
 
    [UIView setAnimationDelegate:self];
 
    // [UIView setAnimationTransition:UIViewAnimationCurveEaseOut forView:self.view.window cache:NO];
 
    [UIView setAnimationTransition:UIViewAnimationCurveEaseOut forView:self.window cache:NO];
 
    [UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
 
    //self.view.window.bounds = CGRectMake(0, 0, 0, 0);
 
    self.window.bounds = CGRectMake(0, 0, 0, 0);
 
    [UIView commitAnimations];
 
}
 
 
 
- (void)animationFinished:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {
 
    if ([animationID compare:@"exitApplication"] == 0) {
 
        exit(0);
 
    }
 
}

  

iOS程序的退出

原文:http://blog.csdn.net/longshiqing14/article/details/45025175

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