ios - 在选项卡之间移动时固定导航栏
问题描述
我在 TabBar 的所有视图中使用相同的 NavBar,现在我有一个 Initial TabBarController,其中包含五个 NavigationController,每个都有其 ViewController。The thing is that when selecting any section in the TabBar the hole screen, including the NavBar, moves to the selected section.
我需要修复导航栏和标签栏,并且只有在点击进入某个屏幕时才能移动中间的内容。
希望问题描述清楚。任何想法我可以做些什么来复制这种行为?谢谢!
解决方案
发生这种情况的原因是因为每个选项卡/视图都有自己的 NavigationController。相反,您需要与所有视图共享一个 NavigationController,这样 NavBar 就不会每次都是新的
推荐阅读
- javascript - 如何使用 vue js 获取元素?
- javascript - 动态表单在 Angular 7 中不起作用
- php - 密码重置令牌存储 - 值应该被散列吗?
- python-3.x - ValueError:请求 url Scrapy 中缺少方案
- amazon-web-services - 我可以给我的客户一个 AWS 存储桶链接,他们可以去那里上传文件吗?
- wordpress - 无法在 WordPress 的表中插入值
- oracle - 我可以使用连接 DB2 和 Oracle 的 dblink 用于 DB2 上的 DML 操作吗?
- ios - Collectionview动态宽度不起作用Swift
- c++ - 向量的 C++ 读取访问冲突
- php - 在 MySQL 中使用 SELECT DISTINCT 从数据中删除非字母字符