expo / ex-navigator

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

FloatFromBottom with a new Navigation Bar #42

Closed rmdort closed 9 years ago

rmdort commented 9 years ago

I am using ExNavigator in my RN app and i want to push a new route with floatFromBottom, but the Navigation Bar is on top of my View and the left button,right button and title cross-fades.

Is there a way to push a new route with floatFromBottom with a new navigation bar that overlays the previous scene?

ide commented 9 years ago

Yes, use a second Navigator.

rmdort commented 9 years ago

I have tried using ExNavigator in the new route, but the previous Navigation Bar is still on top. Any ideas why?

ide commented 9 years ago

Are you nesting them correctly? Make sure the modal is displayed via the outer navigator.

rmdort commented 9 years ago

I am actually using ExNavigator to render the modal


var routes = {
    getNewRoute() {

        return {
            getSceneClass(){

                return require('./containers/main');
            },
            getTitle(){

                return 'Search'
            },
            configureScene(){

                return ExNavigator.SceneConfigs.FloatFromBottom
            },

        }
    }
}

this.props.navigator.push(routes.getNewRoute())

The scene floats from bottom but the Navigation Bar cross fades. Is there anyway to get the Navigation bar to float from bottom as well for the new route

thorbenandresen commented 9 years ago

@rmdort My example might help you. I have a modal on top of a ExNavigator which covers the entire screen. You can then place another ExNavigator in the modal. https://github.com/Thorbenandresen/ExNavigatorExampleModal

btw. the modal comes from the top, but you can easily switch that to bottom - see the Jason Brown's link provided in the repo