swift - 在 UITabBarController 中从 VC 转出后导航栏丢失

标签 swift uinavigationcontroller uitabbarcontroller segue

我正在使用一个自定义框架,该框架是 UITabBarController 的子类,并嵌入在 NavigationController 中。我在 UITabBarController 中有三个 UIViewControllers

在我的一个 UIViewController 中,我想导航到另一个不受 UITabBarController 管理的 UIViewController。我为此使用了一个segue,这确实有效,但是在加载新的 VC 时,没有导航栏,也没有后退按钮,因此我可以返回到由 UITabBarController 管理的 VC。

我怎样才能做到这一点?简而言之,我只是希望能够从由我的 UITabBarController 管理的 VC 导航到不受其管理的 VC,然后返回。

enter image description here

最右下角的 VC 不受 UITabBarController 管理,我试图从 VC 直接导航到其左侧

最佳答案

标签栏 Controller 的每个标签( View Controller )都应该有自己的导航 Controller 。

然后您可以使用选项卡中的 show segue 显示下一个 View Controller 。

关于swift - 在 UITabBarController 中从 VC 转出后导航栏丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48778820/

相关文章:

swift - 无法在 Swift Colab 中使用 %install

iOS( swift ): Presenting View Controller Embedded in Navigation Controller

iphone - 导航栏分段控制

colors - 更改 UITabBar 项目 iOS 9 的未选中颜色

ios - swift UITableView 滞后于图像

ios - 如何在ios swift中为BLE设备写入characteristc值

Swift - 方法存在,但错误 :unrecognized selector sent to instance

ios - 如何为 rootViewController 调用 UINavigationControllerDelegate 委托(delegate)方法

ios - 在 UITabBarController View 之间共享变量

ios - UITabBarController 检查选项卡是否是第一次选择