[英]dismiss nsviewcontroller swift doesn't work
這是按鈕動作:
@IBAction func readyPressed(sender: NSButton) {
self.dismissController(Hardness)
println(1)
self.performSegueWithIdentifier("manual", sender: self)
}
當我按下按鈕,println工作,segue工作,但NSViewController“硬度”不關閉
試試這一行來關閉窗口: self.view.window?.close()
您必須將Action從按鈕添加到First Responder - dismissController:
你可以試試
NSViewController()。解雇(VC)。
要被解除的viewcontroller應作為參數傳遞,調用者可以是任何NSViewController對象。
請嘗試使用
self.dismissViewControllerAnimated(true,completion:{});
或使用
navigationController.popViewControllerAnimated(真)
如此處所示
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.