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

Unexpected margin/padding on the top of the page #2536

Closed
rahulmishra-goibibo opened this issue Oct 23, 2017 · 2 comments
Closed

Unexpected margin/padding on the top of the page #2536

rahulmishra-goibibo opened this issue Oct 23, 2017 · 2 comments

Comments

@rahulmishra-goibibo
Copy link

rahulmishra-goibibo commented Oct 23, 2017

Version

Tell us which versions you are using:

  • react-native-router-flux v4.0.0-beta.22
  • react-native v0.49.3

Expected behaviour

No margin on the top of the page and page must start just below the status bar of the ios device

Actual behaviour

A margin of approx 40-50 pixel appears unexpectedly even after removing all/any styling on the component

I have connected react native router flux with redux and just connected a simple page with it and the margins appear on the out of nowhere on the top of the page. Is there any extra parameter to be added by me to avoid that or did i miss something. Adding code snippet for the above and also the rough look of what i mean to show

Any help would be appreciated and do let me know if i need to give some more information. Thanks in advance!

const RouterWithRedux = connect()(Router);  
<RouterWithRedux>
    <Scene key="root">
        <Scene key="SignUp"  initial>
          <Scene key="signup" component={SignUp} title="SignUp" />
        </Scene>
      </Scene>
      </RouterWithRedux>

simulator screen shot 23-oct-2017 3 46 22 pm

@onrige
Copy link
Collaborator

onrige commented Oct 23, 2017

It happens because any new parent will create his own NavBar. So all you need is just add hideNavBar.

@rahulmishra-goibibo
Copy link
Author

@onrige Thanks for your quick reply. It worked

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