这是支持UIAlertView和UIAlertController的Swift版本的第三方库。
支持 Cocoapods
pod 'SwiftAlertController'
使用
var alertStyle = SwiftAlertControllerStyle.alertView
// 设置为actionSheet
alertStyle = SwiftAlertControllerStyle.actionSheet
let alert:SwiftAlertController = SwiftAlertController(style: alertStyle, title: nil, message: "alert", otherButtons: ["Other"])
alert.showAlertController(self, complete: nil)
备注:因为Cocoapods推送的API必须在iOS8以上,所以改为iOS8以上。如果需要支持iOS8之前的版本,请下载release 1.0.0版本。
注意:因为Cocoapods推送的API必须在iOS8以上,所以改为iOS8以上。如果需要支持iOS8之前的版本,请下载