gpt4 book ai didi

swift - 如何在 UITabBarController 中的另一个 UINavigationController 上显示 UINavigationController?

转载 作者:行者123 更新时间:2023-11-30 13:45:37 28 4
gpt4 key购买 nike

我有一个 UITabBarController,其中包含一些选项卡。其中一个选项卡具有 UINavigationControllerUITableViewController 作为 Root View Controller 。

在此选项卡上,我尝试以模式方式在 UINavigationController 顶部显示 View 。不过,我仍然希望在模态显示后保留底部的UITabBar View 。

这可能吗?也许模态显示是错误的 - 我感觉我需要将 View 呈现为弹出窗口,但是我遇到了问题:

  1. 显示弹出窗口
  2. 关闭弹出窗口

有人对如何实现这一目标有任何想法吗?

注意:我想要模态/作为弹出框显示的是带有 UITableViewUINavigationController作为 Root View 。

最佳答案

看来您想要模态视图,因为可以在不关闭的情况下导航离开它(通过点击另一个选项卡栏项目)。

最合适的用户界面习惯就是插入 View Controller 。您无法选择将其包装到另一个导航 Controller 中(否则它将被视为模式),但您可以修改导航栏以满足您的需求。

例如,要隐藏您将使用的后退按钮

self.navigationItem.hidesBackButton = true

关于swift - 如何在 UITabBarController 中的另一个 UINavigationController 上显示 UINavigationController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34979383/

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