アラートの表示でのエラーが出ています。
Static member 'Alert' cannot be used on instance of type 'UIAlertControllerStyle' と
Expected ',' separator と
Expected ')' in expression list
とエラーが出ています。
//アラートの表示 func showAlert(title:String?,text:String?){ let alert = UIAlertController(title: title, message: text, preferredStyle: <#T##UIAlertControllerStyle#>.Alert) alert.addAction(UIAlertAction(title: "OK", style: <#T##UIAlertActionStyle#>.Default, handler: nil), self.presentedViewController(alert,animated:true,completion:nil) }
とコードを書きました。
let alert: UIAlertController = UIAlertController(title: "アラート表示", message: "保存してもいいですか?", preferredStyle: UIAlertControllerStyle.Alert)
と参考にしたWEBサイトに書いてあって
http://qiita.com/fishpilot272/items/b76e62eb82fc8d788da5
何が文法的に間違っているのかわかりません。
どこを直せば良いのでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。