[英]Xcode Swift perform segue with alert
我有三個ViewController。 當您單擊顯示的警報的“ Ok
按鈕時,我想執行從ThirdViewController
到SecondViewController
。 我已經嘗試使用此代碼:
alert.addAction(UIAlertAction(title: "Ok!", style: UIAlertActionStyle.default, handler: { action -> Void in
self.performSegue(withIdentifier: "ThirdViewControllerSegueBack", sender: self)
}))
問題是,在新窗口SecondViewController
顯示出來,所以當我點擊back
導航欄上它使我回ThirdViewController
。 我希望它顯示FirstViewController
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.