Swift弹窗
2015-09-22 16:41
423 查看
在一个ViewController中使用以下代码:
效果如图:
let alertController = UIAlertController(title: "Game Set", message: "You got 100", preferredStyle: .Alert) alertController.addAction(UIAlertAction(title: "Confirm", style: .Default, handler: nil)) self.presentViewController(alertController, animated: true, completion: nil)
效果如图:
相关文章推荐
- Swift类和结构
- Swift的简单入门1
- swift开发笔记5 - 设置屏幕方向和代码控制布局
- Swift trim space/new line(字符串过滤空格和换行符)
- 自学Swift-斯坦福笔记整理(十三) Application Lifecycle and Core Motion
- Swift数组字典基本定义控制流基本应用
- 关东升的iOS实战系列图书 《iOS实战:入门与提高卷(Swift版)》已经上市
- 关东升的iOS实战系列图书 《iOS实战:入门与提高卷(Swift版)》已经上市
- Swift初探之纯代码写tabBar
- ios swift generator 文章推荐
- Swift版仿封装的个人界面,一分钟集成不是梦!
- Apple Swift编程语言入门教程
- Swift纯代码走进UICollectionView
- [book] iOS 8 Swift Programming Cookbook
- componentsSeparatedByString切割数组 swift
- Swift学习-运算符(二)
- Swift 第十课继承
- Swift学习-基础语法(一)
- ios swift 2 新的OptionSetType使用方法
- Swift 第九课 附属脚本