zoukankan      html  css  js  c++  java
  • 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];

  • 相关阅读:
    构建之法
    第一阶段SCRUM冲刺
    NABCD项目分析
    结对开发
    梦断代码阅读-04
    梦断代码阅读-05
    移动端疫情展示
    用Python爬取疫情数据
    全球疫情可视化地图
    第二阶段冲刺第三天个人记录
  • 原文地址:https://www.cnblogs.com/KiVen2015/p/5391661.html
Copyright © 2011-2022 走看看