gpt4 book ai didi

ios - 如何以编程方式将下一个 View Controller 推送到导航 Controller 上?

转载 作者:行者123 更新时间:2023-11-30 14:17:30 24 4
gpt4 key购买 nike

如何以编程方式在导航 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)

最佳答案

关于ios - 如何以编程方式将下一个 View Controller 推送到导航 Controller 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30949011/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com