expo / ex-navigator

Route-centric navigation built on top of React Native's Navigator
MIT License
522 stars 68 forks source link

Handling nested navigator navbars correctly #57

Closed aksonov closed 8 years ago

aksonov commented 8 years ago

When i push to the screen with own exnavigator, new navbar is fully hidden over old (parent) navbar. When i set sceneStyle.paddingTop, then I will see both navbars correctly, but it is not desired behaviour - i just want to see new navbar, like it is done in iOS Navigator. How to achieve this? Thanks.

ide commented 8 years ago

Try using three navigators:

You push Scene 2 using the Root Navigator instead of the Scene 1 Navigator.

aksonov commented 8 years ago

So to go from Scene 1 to Scene 2 i should use navigator.parentNavigator.push(..) ?

ide commented 8 years ago

Yes, or save a direct reference to the parent navigator. Either works.

aksonov commented 8 years ago

Looks a little bit hacky, is there any problem with nested navigators (if i would implement custom nav bar which will be hidden if nested nav bar is shown)?