gpt4 book ai didi

ios - 如何在 Storyboard 中的选项卡栏上启动导航 Controller 的第三个 View Controller

转载 作者:行者123 更新时间:2023-11-29 05:14:13 26 4
gpt4 key购买 nike

标签栏有三个 View Controller 。我想在打开标签栏时启动导航 Controller 的第三个 View Controller 。当点击第三个 View Controller 上的后退按钮时,移动到第二个 View Controller 。

如何启动第三个 View Controller 并推送第一个、第二个 View Controller 。

它有每个segue。

enter image description here

最佳答案

只需访问您的导航 Controller 并调用 setViewControllers

let nvc = (tabBarController?.viewControllers?[0] as? UINavigationController)
nvc?.setViewControllers([UIViewController1, UIViewController2, UIViewController3], animated: false)

关于ios - 如何在 Storyboard 中的选项卡栏上启动导航 Controller 的第三个 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59352736/

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