0
こんにちは私はユーザーがokアクションボタンをUIAlertViewでクリックした後、他のコントローラにリダイレクトしています。 [OK]を、私はエラーSWRevealViewControllerが予期せずnilが見つかりました。オプション値をアンラッピングしています
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated);
self.view.addGestureRecognizer(self.revealViewController().tapGestureRecognizer())
if revealViewController() != nil {
menuButton.target = self.revealViewController()
menuButton.action = "revealToggle:"
view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}
をリダイレクトしていますsecondViewControllerにここでエラーを取得していますクリックした後
let successAlert = UIAlertController(title: "Success", message: Message.TRIPISLIVE, preferredStyle: UIAlertControllerStyle.Alert)
let action = UIAlertAction(title: "OK", style: .Default) { (action) -> Void in
let viewControllerYouWantToPresent = self.storyboard?.instantiateViewControllerWithIdentifier("MyTripsTableViewController")
self.presentViewController(viewControllerYouWantToPresent!, animated: true, completion: nil)
}
successAlert.addAction(action)
self.presentViewController(successAlert, animated: true, completion: nil)
は致命的なエラーです:
に役立ちます願っています。 – hellosheikh
私の答えは –
に更新されました。完全なコードを書いてください。私は新しいですので、私はそこに何を書くべきか分かりません – hellosheikh