你会发现一个问题,就是我们的页面,跳转到ItemScreen子页面中,tabbar还存在,有时我们不希望他一直存在。怎么办呢?
很easy。
来到ItemScreen:
1 2 3 4 5 6 7 8 |
...... export class ItemScreen extends Component { static navigationOptions = { title: '详情页', tabBarVisible: false, }; render() { ......... |
上面代码很关键的一行:
1 |
tabBarVisible: false, |
就是这一样,就搞定了。