设为首页 加入收藏

TOP

UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlert
2017-10-13 10:17:19 】 浏览:4230
Tags:UIAlertView' deprecated: first deprecated iOS 9.0 UIAlertView deprecated. Use UIAlert

  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];

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇iOS开发 GET、POST请求方法(NSUR.. 下一篇opencv源码阅读之——iOS的两条接..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目