zoukankan      html  css  js  c++  java
  • iOS通过代码关闭程序

    //-------------------------------- 退出程序 -----------------------------------------//

    - (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:UIViewAnimationCurveEaseOutforView:self.window cache:NO];

        [UIViewsetAnimationDidStopSelector:@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);

        }

    }

  • 相关阅读:
    Java基本元素
    wsgiref模块
    Web框架与HTTP协议
    pymysql 于pycharm中操作mysql
    mysql
    协程
    jQuery选择器
    网络编程→锁/队列/线程
    初识网络编程&并发编程
    navcat 如何将一个库的表抽到另一个库中
  • 原文地址:https://www.cnblogs.com/zxykit/p/5216642.html
Copyright © 2011-2022 走看看