UIAlertController的进化
来源:互联网 发布:js引用 编辑:程序博客网 时间:2024/05/01 12:16
根据书上的代码敲时发现
uialertview已经不可用了(包括action sheet)
建议使用UIAlertController
这个东西是个好东西
@IBAction func nv(_ sender: Any) { let alertController = UIAlertController(title: "系统提示", message: "测试", preferredStyle: .alert) let cancelAction = UIAlertAction(title: "取消", style: .cancel, handler: nil) let okAction = UIAlertAction(title: "好的", style: .default, handler: { action in// }) alertController.addAction(cancelAction) alertController.addAction(okAction) self.present(alertController, animated: true, completion: nil) } @IBAction func vv(_ sender: Any) { let alertController = UIAlertController(title:"保存或删除数据", message:"删除数据将不可恢复", preferredStyle: UIAlertControllerStyle.actionSheet) let cancelAction = UIAlertAction(title:"取消", style: UIAlertActionStyle.cancel, handler: nil) let deleteAction = UIAlertAction(title:"删除", style: UIAlertActionStyle.destructive, handler: nil) let archiveAction = UIAlertAction(title:"保存", style: UIAlertActionStyle.default, handler: nil) alertController.addAction(cancelAction) alertController.addAction(deleteAction) alertController.addAction(archiveAction) self.present(alertController, animated:true, completion: nil) }
0 0
- UIAlertController的进化
- UIAlertController的写法
- iOS8的UIAlertController
- ios8之后的UIAlertController
- UIAlertController的使用(Swift)
- UIAlertController的使用示例
- UIAlertController的用法
- UIAlertController的使用二
- UIAlertController的用法示例
- UIAlertController的使用
- UIAlertController的使用
- 关于UIAlertController的使用
- UIAlertController的使用
- UIAlertController 的使用
- UIAlertController 的使用
- UIAlertController的使用
- UIAlertController的用法
- swift 的 UIAlertController使用
- IO流_字符缓冲流复制文本文件案例1
- MVP+Dagger2+Rxjava+Retrofit+GreenDao 开发的小应用,包含新闻、图片、视频3个大模块,代码封装良好
- HDU-5178
- centos6.5安装配置redis3.0
- 函数的调用行为
- UIAlertController的进化
- JSP文件的各个路径的获取
- win10装SCIATRAN辐射传输模式
- zone_reclaimable
- Ubuntu环境下SSH的安装使用以及使用证书免密码登录ssh服务器
- Java容器(七):TreeMap源码分析
- 区间[A,B]与N互素的元素个数 [容斥][Eratosthenes筛法]
- 简单java扑克牌小程序(发牌,三个玩家,不含大小王)
- 因为jsoup,再见了我的htmlparser