在react-native-router-flux标签栏中隐藏导航栏

时间:2016-11-01 07:03:43

标签: react-native tabbar react-native-router-flux

native-router-flux的tabbar'。当我使用tabbar时,Navbar显示屏幕的顶部。所以我想删除那个Navbar。但我无法做到。请帮助我!!!

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  TextInput,
  Navigator,
  View
} from 'react-native';
import {Scene, Router} from 'react-native-router-flux';
import Home from './Home';  
import Shake from './Shake';
import Profile from './Profile';



export default class JunProject extends Component {
  render() {
    return (
     <Router>
      <Scene key="tabbar" tabs={true} hideNavBar={true} >
        <Scene key="Home" component={Home} title="Home" initial={true} />
        <Scene key="Shake" component={Shake} title="Shake" />
        <Scene key="Profile" component={Profile} title="Profile" />
      </Scene>
    </Router>
  );
  }
  }



  AppRegistry.registerComponent('JunProject', () => JunProject);

1 个答案:

答案 0 :(得分:1)

你可以使用hideTabBar道具

示例:

<Scene key="Profile" component={Profile} title="Profile" hideTabBar={true} />

Checkout doc - &gt; https://github.com/aksonov/react-native-router-flux/blob/master/docs/API_CONFIGURATION.md