Closed jinghun1999 closed 6 years ago
render() { let {tabBarShow} = this.props; return ( <View style={{flex: 1}}> <TabNavigator hidesTabTouch={true} sceneStyle={{paddingBottom: 0}} tabBarStyle={tabBarShow ? styles.tabNav : styles.tabNavHide}> {this._renderTabItem('ios-home', MY_HEALTH, this._createChildView(MY_HEALTH_CONSULT))} {this._renderTabItem('ios-book', MY_HEALTH_CONSULT, this._createChildView(MY_HEALTH))} {this._renderTabItem('ios-color-fill', MY_HEALTH_TOOLS, this._createChildView(MY_HEALTH_TOOLS))} {this._renderTabItem('ios-film', MY_HEALTH_COMMUNITY, this._createChildView(MY_HEALTH_COMMUNITY))} {this._renderTabItem('ios-person', MY_HEALTH_ACCOUNT, this._createChildView(MY_HEALTH_ACCOUNT))} ); }
why i can't insert the code with format ?
hello, i have the same problem.Do you have found the way? @jinghun1999
render() {
let {tabBarShow} = this.props;
return (
<View style={{flex: 1}}>
<TabNavigator
hidesTabTouch={true}
sceneStyle={{paddingBottom: 0}}
tabBarStyle={tabBarShow ? styles.tabNav : styles.tabNavHide}
>
{this._renderTabItem('ios-home', MY_HEALTH, this._createChildView(MY_HEALTH_CONSULT))} {this._renderTabItem('ios-book', MY_HEALTH_CONSULT, this._createChildView(MY_HEALTH))} {this._renderTabItem('ios-color-fill', MY_HEALTH_TOOLS, this._createChildView(MY_HEALTH_TOOLS))} {this._renderTabItem('ios-film', MY_HEALTH_COMMUNITY, this._createChildView(MY_HEALTH_COMMUNITY))} {this._renderTabItem('ios-person', MY_HEALTH_ACCOUNT, this._createChildView(MY_HEALTH_ACCOUNT))}
</TabNavigator>
</View>
);
}
use code-block markdown syntax. your code should be shown like above @jinghun1999
Did you has fixed ?
在推入第二个页面时,把Navigation高度设置为0就可以了
When you push in the second page, the Navigation height is set to 0 on it
Will close since this issue is more than a year, feel free to a open a new if this is still a issue.
i want to hide the tab bar in the sub commponent, but how?
render() { let {tabBarShow} = this.props; return ( <View style={{flex: 1}}> <TabNavigator hidesTabTouch={true} sceneStyle={{paddingBottom: 0}} tabBarStyle={tabBarShow ? styles.tabNav : styles.tabNavHide}> {this._renderTabItem('ios-home', MY_HEALTH, this._createChildView(MY_HEALTH_CONSULT))} {this._renderTabItem('ios-book', MY_HEALTH_CONSULT, this._createChildView(MY_HEALTH))} {this._renderTabItem('ios-color-fill', MY_HEALTH_TOOLS, this._createChildView(MY_HEALTH_TOOLS))} {this._renderTabItem('ios-film', MY_HEALTH_COMMUNITY, this._createChildView(MY_HEALTH_COMMUNITY))} {this._renderTabItem('ios-person', MY_HEALTH_ACCOUNT, this._createChildView(MY_HEALTH_ACCOUNT))} </TabNavigator> </View> ); }