老师,使用createStackNavigator,和createBottomTabNavigator的时候上边的导航栏不显示,跳转也跳转不了了
来源:2-7 TabNavigator精讲-2
慕粉0922045330
2018-11-02
部分代码如下:
export const AppTabNavigator = createBottomTabNavigator({
Home:{
screen:HomePage,
navigationOptions: ({navigation})=>({
tabBarLabel:‘首页’,
tabBarIcon:({tintColor,focused})=>(
<TabBarItem
tintColor={tintColor}
focused={focused}
normalImage={require(’…/res/images/ic_trending.png’)}
selectedImage={require(’…/res/images/ic_trending.png’)}
/>
)
})
},
})
export const AppStackNavigator = createStackNavigator({
HomePage:{
screen:HomePage,
navigationOptions:{
headerTitle:“首页”
}
},})
写回答
1回答
-
CrazyCodeBoy
2018-11-05
将要跳转到的页面配置到AppStackNavigator下,然后正常跳转即可,也可以完整代码贴出,我帮你看看哈
00
相似问题