Sar*_*ran 1 tabbar react-native react-native-router-flux
如何更改tabbar的位置?我希望有很多应用程序,需要在顶部有一个tabbar 而不是在底部...
我期待这样的事情:
<Router createReducer={reducerCreate}>
<Scene key="somekey" tabs={true}
tabBarStyle={{position:'top'}}> <== How do I do this?
# My tabs here as scenes
</Scene>
</Router>
Run Code Online (Sandbox Code Playgroud)
因为tabBar具有绝对定位.您必须设置top属性.
tabBarStyle={{top:0}}
Run Code Online (Sandbox Code Playgroud)
您必须考虑状态栏的高度和NavBar的高度,才能获得正确的定位.
ps:我不知道你是否意识到这一点,但避免使用内联样式.如果仅仅是为了这个例子,请忽略我的建议.:P
| 归档时间: |
|
| 查看次数: |
2010 次 |
| 最近记录: |