Hussian Shaik
Hussian Shaik

Reputation: 2659

side-menu in navgation-bar for both android and IOS in react-native

I am trying to show side-menu with in a navigator,I tried using NavigatorIOS it;s working fine in IOS, But the problem is with android why because, the Component NavigatorIOS will not wok in android here the code which i used using NavigatorIOS

render(){
    return (
      <SideMenu ref="sidemenu" touchToClose={true} disableGestures={true} menu={<Menu getNavigator={this.getNavigator} showSideBar={this.showSideBar} LogOut={this.LogOut} data = {this.props.data}/>}>
          <NavigatorIOS
            ref = "nav"
            shouldUpdate={true}
            style={styles.container}
            barTintColor='#1A8A29'
            tintColor='white'
            titleTextColor='white'
            initialRoute={{
              component: MyProfile,
              title:'My Profile',
              passProps:{data:this.props.data},
              leftButtonIcon: require('image!menu1'),
              onLeftButtonPress: ()=> {this.showSideBar(); },
              rightButtonTitle: 'Log Out',
              onRightButtonPress: ()=> {this.LogOut();},
            }}
            />
      </SideMenu>
    );
  }

i want to use this using Navigator can any one give me suggestions that how to write this using Navigator in react-native, Any help much appreciated

Upvotes: 0

Views: 168

Answers (1)

Moss Palmer
Moss Palmer

Reputation: 1854

Use Navigator, not NavigatorIOS. NavigatorIOS is not actively updated by the core ReactNative team and isn't as flexible as Navigator.

Upvotes: 0

Related Questions