我必须将主页的标题设置为顶部,但是TabNavigator是默认的顶部。我该如何编辑? TabNavigator始终位于页面顶部。
const HomeStack = createStackNavigator({
Home: { screen: Home,navigationOptions: {headerStyle: {
backgroundColor: '#222222',},headerTintColor: 'white',headerTitle:'title1',headerBackTitle: ' '} },
});
const OtherStack = createStackNavigator({
Other: { screen: Other,navigationOptions: {headerStyle: {
backgroundColor: '#222222'},headerTintColor: 'white',headerTitle:'title2'} }
});
const MainScreenNavigator = TabNavigator(
{
Home: {screen : HomeStack},
Other: {screen : OtherStack},
},
{
tabBarComponent: props => {
return (
<View>
<Footer>
<FooterTab>
<Button 1/>
<Button 2/>
</FooterTab>
</Footer>
</View>
);
}
});