iOSアプリ開発をしていて、アラートを出すために以下の様なコードを書いたのですが、
途中で落ちてしまいます。原因が見当たらずとても困っています。
var alertController = UIAlertController(title: "ログアウトしますか?", message:"", preferredStyle: UIAlertControllerStyle.Alert) let はいAlertAction = UIAlertAction(title: "はい", style: UIAlertActionStyle.Default, handler: { // ユーザデータを削除 (action:UIAlertAction!) -> Void in self.parentViewController?.parentViewController?.dismissViewControllerAnimated(true, completion: nil) self.userData.setBool(false, forKey: "willSkipLoginView") }) let いいえAlertAction = UIAlertAction(title: "いいえ", style: UIAlertActionStyle.Cancel, handler: nil) alertController.addAction(はいAlertAction) alertController.addAction(いいえAlertAction) self.presentViewController(alertController, animated: true, completion:nil)
Xcodeは6.3.1、シミュレータのOSはiOS 7.1です。
どうかよろしくお願い致しますm(_ _)m
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/28 12:17