始终在 React Native 中显示底部选项卡导航器 React Navigation 5
Always show bottom tab navigators React Navigation 5 in React Naive
修复底部选项卡导航器出现,即使我点击堆栈导航器或多个嵌套堆栈导航器,它仍然像 Facebook 应用程序一样显示底部选项卡导航。就像下面这个例子一样,我在页面中单击,这是嵌套的堆栈导航,但底部选项卡导航器仍然总是出现。通常,当我单击堆栈导航器时,新屏幕将出现在顶部,底部选项卡导航器将消失。
除了从道具等中隐藏选项卡导航器外,您还需要考虑导航器的位置。父导航器的 UI 将始终呈现在子导航器 UI 之上。这是来自反应导航 documentation:
Stack navigators nested inside each screen of tab navigator - The tab bar is always visible. Usually pressing the tab again also pops the stack to top.
可以使用嵌套的react navigation 5,参考文档:https://reactnavigation.org/docs/nesting-navigators/
除了从道具等中隐藏选项卡导航器外,您还需要考虑导航器的位置。父导航器的 UI 将始终呈现在子导航器 UI 之上。这是来自反应导航 documentation:
Stack navigators nested inside each screen of tab navigator - The tab bar is always visible. Usually pressing the tab again also pops the stack to top.
可以使用嵌套的react navigation 5,参考文档:https://reactnavigation.org/docs/nesting-navigators/