Skip to content

NavigatorIOS doesn't work with TabBarIOS #504

@evanwalsh

Description

@evanwalsh

Inside of my index.ios.js, I've got this:

render() {
    return (
      <TabBarIOS
        selectedTab={this.state.selectedTab}>
        <TabBarItemIOS
          name="search"
          icon={require('image!search')}
          selected={this.state.selectedTab === 'search'}
          onPress={() => {
            this.setState({
              selectedTab: 'search'
            });
          }}>
          <View>
            <NavigatorIOS
              ref="nav"
              initialRoute={{
                component: SearchScreen,
                title: config.names.search,
              }}
            />  
          </View>
        </TabBarItemIOS>
      </TabBarIOS>
    );
  }

When the tab is selected, it does not display the NavigatorIOS correctly. The navigation bar appears at the top (and the navigator's initial route component does get mounted). However, it is not displayed at all. It's just a blank space inside.

When I try rendering the initial route component outside of the NavigatorIOS, it works just fine. Is this intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions