-
Notifications
You must be signed in to change notification settings - Fork 68
How can I hide the navigation bar? #25
Comments
There is a property on ExNavigator that is used to hide/show the navbar: https://github.com/exponentjs/ex-navigator/blob/master/ExNavigator.js#L100 So you can do:
to hide the navigation bar :) |
Is there any way to hide it only for first scene, but not second? |
You have to write a custom navigation bar and hide it however you want to. |
How to access to current route from custom navigator bar? Pavel.
|
I don't think that's built in but you could set 'global.currentRoute = route' in a focus handler. Then your nav bar would have access to it. The later you figure out how to not use a global. The idea here is that it's all just code; write whatever works for you. |
I tried to return null from rendernavigatorbar but it doesn't hide it. Abe example ? Pavel.
|
You need to write a custom component that animates itself off the screen, or fades out. It seems like this is a popular request so maybe someone else has written an example of a hiding nav bar and can share it. |
@ide It would be really great, if exNavigator passes navigator instance to navbar. This way i could found current route without any globals. |
Currently i'm doing following, but it looks a little bit hacky: this.props.routeMapper._navigator |
@aksonov The underlying facebook Navigator/NavigationBar doesn't pass in the Navigator instance so ExNavigator doesn't do it either. There is a |
What I did to solve this was to call a ExNavigator child in a new route with showNavigationBar: false. I don't know if this is the best solution but it worked for me. |
Thank you so much for creating the ExNavigator.
I am switching from Navigator to ExNavigator in our app in hopes to significantly improve transitions :).
I have a need to hide a Navigation bar on some screens. Could you please add it? Or if it already is in the package please advice on how do I proceed about it?
The text was updated successfully, but these errors were encountered: