首页 > 代码库 > 退出应用

退出应用

- (void)exitApplication {

    

    [UIViewbeginAnimations:@"exitApplication"context:nil];

    [UIViewsetAnimationDuration:0.5];

    [UIViewsetAnimationDelegate:self];

    [UIViewsetAnimationTransition:UIViewAnimationCurveEaseOutforView:self.viewcache:NO];

    [UIViewsetAnimationDidStopSelector:@selector(animationFinished:finished:context:)];

   self.view.bounds =CGRectMake(0,0, 0, 0);

    [UIViewcommitAnimations];

    

}


- (void)animationFinished:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context {

   if ([animationID compare:@"exitApplication"] ==0) {

       exit(0);

    }

}

退出应用