ios8以后是用UIAlertController来代替UIAlertView(在屏幕中间弹出)和UIActionSheet(显示在屏幕底部的弹出框)
//定义一个UIActionSheet
let ActionSheet = UIAlertController(title: "标题", message: "信息", preferredStyle: .ActionSheet)
//定义一个UIAlertView的用法跟UIActionSheet是一样的只是修改一下preferredStyle就可以了
let alert = UIAlertController(title: "标题", message: "信息", preferredStyle: .Alert)
//添加按钮点击
let cancelAction = UIAlertAction(title: "取消", style: .Cancel, handler: nil)
let chooseAction = UIAlertAction(title: "确定", style: .Default, handler: nil)
//将Action添加到弹出框中
ActionSheet.addAction(cancelAction)
ActionSheet.addAction(chooseAction)
//显示弹出框
self.presentViewController(ActionSheet, animated: true, completion: nil)
具体使用得根据自己的项目开发需要进行定义,希望这篇博客你能看得懂那是我的荣幸.