我遇到了反应本机路由器通量导航的问题。我想使用 react-native-vector-icons 为我的标签显示一个图标,但对于组件 {ScreenOverview} 它不显示该图标。
代码:
const Scenes = Actions.create(
<Router>
<Scene key='root' hideNavBar>
<Scene
key='amount'
component={ScreenAmountPlayer}
title='AmountOfPlayer'
initial
/>
<Scene
key='names'
component={ScreenEnterPlayerNames}
title='EnterNames'
hideNavBar
/>
<Scene
key='playScreen'
hideNavBar
tabs={true}
>
<Scene
key='Play!'
component={PlayScreen}
icon={TabIcon}
iconName={'play-circle-o'}
hideNavBar
/>
<Scene
key='Overview'
iconName={'list-ul'}
icon={TabIcon}
component={ScreenOverview}
hideNavBar
/>
</Scene>
</Scene>
</Router>
)
当我将第二个场景更改为:
<Scene
key='Overview'
iconName={'list-ul'}
icon={TabIcon}
component={PlayScreen}
hideNavBar
/>