ios - 当 segue 甚至 NavigationController Swift 时,TabBar 消失

标签 ios swift uinavigationcontroller uitabbarcontroller segue

好吧,我面临着误解。 我希望当我从“历史记录”按钮进行转场时,我的 UITabBar 保持显示(见图)。

  • 我的 segue 正在显示。
  • 我的 View 嵌入在 UINavigationController 中,它是我的 UITabBarController 的根 Controller 。
  • 我的 UINavigationController 上的“显示导航栏”已关闭。

尽管如此,我的 segue 上出现灰屏,并且没有 UITabBar...

提前谢谢您!

Part of my structure of storyboard

最佳答案

尝试创建一个弹出 View 。 在 Storyboard中,请记住为您要使用的 View Controller 设置标识符。然后删除segue。

 let customAlert = self.storyboard?.instantiateViewController(withIdentifier: "view") as! yourViewController
    self.addChild(customAlert)
    self.view.addSubview(customAlert.view)
    customAlert.view.backgroundColor = UIColor.white

关于ios - 当 segue 甚至 NavigationController Swift 时,TabBar 消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55133728/

相关文章:

ios - 在 iOS 通知内容扩展中关闭键盘

ios - 重用自定义 Collection View 单元格保留旧的大小属性

swift - calendar.date(bySetting : . day, value : 1, of: Date()) 错误的总是加上一个月

ios - leftCalloutAccessoryView 已设置但现在正在显示

swift - 如何在 Swift 5 中以编程方式更改导航栏的背景颜色?

iOS 原生信用卡自动填充功能与移动结账冲突

ios - 标签栏重叠 View 后面

swift - 在 NavigationController 中添加右键按钮

ios - UINavigationController 大小

ios - 如何使用 Swift 使用此代码片段为 iOS 应用程序初始化 SDK?