【发布时间】:2016-10-07 05:36:39
【问题描述】:
在 React Native Router Flux 中,我有一个功能性的 react-native-drawer,称为 NavDrawer。它目前在导航栏左侧有默认的汉堡菜单图标,并希望将其更改为另一个自定义图标。所以我尝试了,leftTitle='Menu',但它没有改变。
所以我想知道如何自定义react-native-drawer 的默认菜单图标?
我还通过navigationBarStyle 更改了导航栏的高度,因此按钮当前位于靠近导航栏底部而不是中间的位置。所以在navigationBarStyle 中,我尝试了flex: 1, flexDirection: 'row', alignItems: 'center',但没有改变任何东西。
那么如何在导航栏中水平居中对齐元素?
代码如下:
<Scene key='drawer' component={NavDrawer} open={false}>
<Scene key="main" navigationBarStyle={styles.navigationBar} onRight={() => Actions.profile()} rightTitle='Profile'>
...
</Scene>
<Scene/>
谢谢
【问题讨论】:
标签: javascript ios reactjs react-native react-native-router-flux