Swift弹窗

在一个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)

效果如图:

posted @ 2015-09-22 16:41  Cecil_Ma  阅读(504)  评论(0编辑  收藏  举报