在 React 导航中将 TabNavigator 栏集成到 StackNavigator header

Integrate TabNavigator bar into StackNavigator header in React navigation

我想在 StackNavigator header 下设置 TabNavigator 栏,就像在 android 设置中一样...

所以我将 TabNavigator 放在 StackNavigator 中,结果是 StackNavigator header...

令人讨厌的提升

有谁知道如何在不影响 ios 侧的情况下消除该高度?

我在 StackNavigator 样式的设置中找到了解决方案。参见 elevation 属性。但它只适用于 react-navigation 版本 1.0.0-beta.7

StackNavigator.navigationOptions = {
  title: 'Blabla',
  header: {
    tintColor: Colors.navbarTintColor,
    style: {
      elevation: 0,
      backgroundColor: Colors.surfacePrimary,
    },
    right: this.renderContexMenu(),
  },
}

后期版本使用 headerStyle 而不是 header