• UIAlertView' is deprecated: first deprecated in iOS 9.0


      UIAlertController * cancleAlertController = [UIAlertController alertControllerWithTitle:nil message:@"你确定退出登录?" preferredStyle:UIAlertControllerStyleAlert];

        

    //    第一种添加方法

        [cancleAlertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

            

            NSLog(@"点击取消");

            

        }]];

      //    第二种添加方法

        UIAlertAction * otherAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

            NSLog(@"点击确定");

            

        }];

        

        [cancleAlertController addAction:otherAction];

        //弹出视图

        [self presentViewController:cancleAlertController animated:YES completion:nil];

  • 相关阅读:
    爬虫基础 2.1 http原理
    爬虫基础 2.1 http原理
    3.29上午
    3.28
    3.27下午
    3.27上午
    3.24上午
    3.23下午
    3.23上午
    3.22上午
  • 原文地址:https://www.cnblogs.com/KiVen2015/p/5391661.html
Copyright © 2020-2023  润新知