我试图做简单的警报在新的Xcode 8.3.2更新我正在同时提出警告对话框中面临的问题:无法将'UIAlertAction'类型的值转换为期望的参数类型'UIViewController'?
@IBAction func testButonAlert()
{
let alertAction = UIAlertAction(title : "Hi TEst" ,
style : UIAlertActionStyle.destructive,
handler : { (UIAlertActionStyle) -> Void in print("") })
self.present(alertAction , animated: false, completion: nil)
}
错误:
不能键入“UIAlertAction”的值转换为预期参数类型 '的UIViewController'