UIAlertView   在iOS2 的时候开始使用,在iOS9 的时候被摒弃

NS_CLASS_DEPRECATED_IOS(2_0, 9_0, "UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead") __TVOS_PROHIBITED

由UIAlertController替代

常用使用方法

    UIAlertController *alertvc = [UIAlertController alertControllerWithTitle:@"提示" message:@"表视图封装" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//要执行的操作
}];
[alertvc addAction:sureAction];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消"style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
//要执行的操作 }];
[alertvc addAction:cancelAction]; [self presentViewController:alertvc animated:YES completion:nil];

UIAlertController简单使用的更多相关文章

  1. UIAlertController 简单修改title以及按钮的字体颜色

    苦逼的开发者,最终败给了一个任性的UI,系统原生UIAlertController的按纽颜色必须改.于是,开始了不归路.之前的版本是自己用view写的一个仿系统UIActionSheet,动画感觉都挺 ...

  2. UIAlertView/UIAlertController封装使用

    基于UIAlertView封装的JXTAlertView,这个是将之前写Demo时搞的一套快捷使用alertView的工具抽离整理出来的,并提供了C函数直接调用,像这样: jxt_showAlertT ...

  3. iOS--UIAlertView与UIAlertController和UIAlertAction之间的事儿

      iOS 8的新特性之一就是让接口更有适应性.更灵活,因此许多视图控制器的实现方式发生了巨大的变化.全新的UIPresentationController在实现视图控制器间的过渡动画效果和自适应设备 ...

  4. 开始使用 UIAlertController 吧

    UIAlertView 与 UIActionSheet UIAlertView 样式 实现 - (void)showAlertView { self.alertView = [[UIAlertView ...

  5. iOS 8.0后使用UIAlertController

    iOS 8的新特性之一就是让接口更有适应性.更灵活,因此许多视图控制器的实现方式发生了巨大的变化.全新的UIPresentationController在实现视图控制器间的过渡动画效果和自适应设备尺寸 ...

  6. UIAlertController、UIAlertAction 警告框

      NS_CLASS_AVAILABLE_IOS(8_0) @interface UIAlertAction : NSObject <NSCopying> //创建操作 + (instan ...

  7. UIAlertController的使用

    在iOS8中,苹果对UIAlertView和UIActionSheet进行了重新的封装,成为适应性更强,灵活性更高的UIAlertController.具体使用方法如下. UIAlertControl ...

  8. UIAlertController 使用

    iOS 8的新特性之一就是让接口更有适应性.更灵活,因此许多视图控制器的实现方式发生了巨大的变化.全新的UIPresentationController在实现视图控制器间的过渡动画效果和自适应设备尺寸 ...

  9. 30 分钟开发一个简单的 watchOS 2 app <oneVcat>

    Apple Watch 和 watchOS 第一代产品只允许用户在 iPhone 设备上进行计算,然后将结果传输到手表上进行显示.在这个框架下,手表充当的功能在很大程度上只是手机的另一块小一些的显示器 ...

随机推荐

  1. 最短路径问题---Dijkstra算法详解

    侵删https://blog.csdn.net/qq_35644234/article/details/60870719 前言 Nobody can go back and start a new b ...

  2. 笔记本如何设置插入USB鼠标自动禁用触摸板

    Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Synaptics\SynTPEnh] [HKEY_LOCAL_MAC ...

  3. python虚拟环境搭建

    1.安装python环境 2.检查pip 3.pip install virtualenv 4.创建测试:virtualenv  testvir 5.pip install virtualenvwra ...

  4. TFS 生成任务报错:目录不是空的

    转到代理目录下,将生成文件夹清空,重新启动生成任务即可

  5. 一脸懵逼学习keepalived(对Nginx进行热备)

    1:Keepalived的官方网址:http://www.keepalived.org/ 2:Keepalived:可以实现高可靠: 高可靠的概念: HA(High Available), 高可用性集 ...

  6. Tomcat模型结构

    一.请求过程 Tomca的两大组件:Connecter和Container Connecter组件 1.Connecter将在某个指定的端口上侦听客户请求,接收浏览器的发过来的 tcp 连接请求,创建 ...

  7. js/jquery如何获取获取父窗口的元素

    1.$("#父窗口元素ID",window.parent.document); 对应javascript版本为 window.parent.document.getElementB ...

  8. 【AtCoder】ARC073

    ARC 073 C - Sentou 直接线段覆盖即可 #include <bits/stdc++.h> #define fi first #define se second #defin ...

  9. Linux 配置最新的epel源

    一.Centos6 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm 二.Cento ...

  10. Vijos1983 NOIP2015Day2T3 运输计划 transport LCA

    题目链接Vijos 题目链接UOJ 该博客在博客园的链接 转载一个大佬的题解: 点击这里->大佬题解 下面谈谈我的感悟: 当然写代码也是写的很艰辛: 我力劝C++的同胞们,这题卡常数,Dfs党会 ...