react-native 导航栏的传值、tabbarNavigation 如何隐藏tabbar

就导导航栏的传值,可分为两种:

1.通过类似于iOS中的通知DeviceEventEmitter来实现组件之间的通讯,相关链接见:http://www.cnblogs.com/hd1992/p/5659261.html 

2.导航栏需要向它的组件传值,一个navigator组件被StackNavigator(...)创建出来,可以伴随以下属性。
·screenProps- 为子界面传递额外的参数、选项,for example:

const SomeStack = StackNavigator({ // config 配置该navigator});<SomeStack //通过this.props.screenProps获得该参数内容 screenProps={ /* this prop will get passed to the screen components as this.props.screenProps */}/> 
上述内容来自: http://www.jianshu.com/p/80408a62d690

3.用redux管理状态(暂时没去研究).

tabbarNavigation 如何隐藏tabbar :
据官网介绍:https://github.com/happypancake/react-native-tab-navigator

Hiding the Tab Bar

You can hide the tab bar by using styles. For example:

let tabBarHeight = 0;
<TabNavigator
  tabBarStyle={{ height: tabBarHeight, overflow: 'hidden' }}
  sceneStyle={{ paddingBottom: tabBarHeight }}
/>







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值