Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Navbar height #604

Closed
SourceErr0r opened this issue Jun 24, 2022 · 11 comments
Closed

iOS Navbar height #604

SourceErr0r opened this issue Jun 24, 2022 · 11 comments

Comments

@SourceErr0r
Copy link

Hi!

For some reason it seems like the navbar on iOS is rendering at double height. I've tried running through various props on the <NavigationBar> component but with no luck. You can see an example below:

You can see an example here

Do you happen to know why this might be happening, and how to resolve? I'm using a fairly standard TabBar implementation, and this issue is occurring both top level and on children with breadcrumbs.

@grahammendick
Copy link
Owner

Could you show me your TabBar implementation, please? Not all the code, just the high level layout

@SourceErr0r
Copy link
Author

SourceErr0r commented Jun 24, 2022

Sure,

<TabBar
      scrollable={false}
      defaultTab={0}
      labelVisibilityMode="labeled"
      primary={true}
      barTintColor={'rgb(247,247,247)'}
      selectedTintColor="#3B852A"
    >
      <TabBarItem title="Home" image={require('../assets/home.png')}>
        <NavigationHandler stateNavigator={homeNavigator}>
          <NavigationStack />
        </NavigationHandler>
      </TabBarItem>
      <TabBarItem title="Profile" image={require('../assets/profile.png')}>
        <NavigationHandler stateNavigator={profileNavigator}>
          <NavigationStack />
        </NavigationHandler>
      </TabBarItem>
      <TabBarItem title="More" image={require('../assets/more.png')}>
        <NavigationHandler stateNavigator={menuNavigator}>
          <NavigationStack />
        </NavigationHandler>
      </TabBarItem>
    </TabBar>

@grahammendick
Copy link
Owner

Thanks, and can you show me one of the scenes with the NavigationBar in. Again just the high level layout

@grahammendick
Copy link
Owner

Does it render double height if you rendered it outside of the TabBar?

@SourceErr0r
Copy link
Author

<>
      <NavigationBar
        title={ref}
        barTintColor={colors.Primary}
        titleColor={colors.White}
        tintColor={colors.White}
      />
      <View style={styles.container}>
          <Text style={styles.text}>{title}</Text>
      </View>
      {loading && <GenericLoader />}
</>

I'll have a check re: outside tab bar. One moment

@SourceErr0r
Copy link
Author

Correct height when rendered outside of Tabs

@grahammendick
Copy link
Owner

Can you try the twitter sample and see if you get the double height issue, please?

@SourceErr0r
Copy link
Author

SourceErr0r commented Jun 24, 2022

Also, if I do not include the <NavigationBar> component, I get the default navbar rendered still at double height (which is the oddest part for me - I thought it might be stacking with the default)

Just need to pop out and grab lunch, I'll give the sample a try when I get back!

@grahammendick
Copy link
Owner

grahammendick commented Jun 24, 2022

Oh thanks, I think I've got it. You need to hide the NavigationBar in the scene with the tabs in.

@grahammendick
Copy link
Owner

Otherwise you're getting 2 navigation bars. One from the tabs scene and then the actual one you want from the tab content scene

@SourceErr0r
Copy link
Author

Ahhh that's done it, brilliant, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants