如何以编程方式在导航 Controller 上推送下一个 View Controller (无需按钮)?
我知道如何实例化并呈现一个新的 Controller 如下
var next = self.storyboard?.instantiateViewControllerWithIdentifier("PlaceInfo") as! PlaceInfoController
self.presentViewController(next, animated: false, completion: nil)
但我想推送到导航 Controller 上的下一个 View Controller 。 我尝试了以下 self.navigationController?.pushViewController() 但没有成功
var next = self.storyboard?.instantiateViewControllerWithIdentifier("PlaceInfo") as! PlaceInfoController
self.navigationController?.pushViewController(next, animated: true)
最佳答案
您是否尝试过使用performSegueWithIdentifier
?
在此处了解更多信息:
关于ios - 如何以编程方式将下一个 View Controller 推送到导航 Controller 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30949011/