How do I create a native looking modal view segue with react-native?

后端 未结 2 696
無奈伤痛
無奈伤痛 2020-12-24 09:38

Is there an way to perform a modal segue, animating the view and navbar up from the bottom, covering the existing navbar, view and tabbar, etc. ?

There is a similar

相关标签:
2条回答
  • 2020-12-24 10:03

    I work on the React Native Navigator component.

    To accomplish this, you can put a Navigator within the scene of another Navigator. The outside navigator configures its scene with Navigator.SceneConfigs.FloatFromBottom or something similar. Inside the scene, you can have another <Navigator> with navigationBar={<Navigator.NavigationBar ...etc />}

    0 讨论(0)
  • 2020-12-24 10:05

    enter image description here

    this.props.navigator.push({
        title: 'Pick Date',
        sceneConfig: Navigator.SceneConfigs.FloatFromBottom,
        component: DatePickerView,
        navigationBar: <NavigationBar
            title="Initial View"/>,
        passProps: {handleSelectedDate: this.handleSelectedDate}
    })
    

    Link to source is here: https://github.com/aaronksaunders/React-Modal-Nav-Example

    0 讨论(0)
提交回复
热议问题