1

我创建了一个像这样的底部导航器:

const IOSTabs = createBottomTabNavigator(
  {
    Home: {
      screen: HomeScreen,
      navigationOptions: {
        headerStyle: {backgroundColor: 'green'},
        title: 'Home',
        tabBarLabel: 'Homes',
        tabBarIcon: <Icon name="home-outline" size={25}/>,
      }
    },
    Settings: {
      screen: SettingsScreen,
      navigationOptions: {
        tabBarIcon: <Icon name="settings-outline" size={25} />
      }
    }
  }
);
const StackNavigator = createStackNavigator(
  {
    Home: IOSTabs
  }
);
const AppNavigator = createAppContainer(StackNavigator);
export default {
  components: { AppNavigator }
}

这很好用,虽然标题显示,但标题为空,无法向其添加按钮或文本。我认为title应该显示标题,但事实并非如此。

我在这里想念什么?

4

0 回答 0