添加react-native-splashScreen后顶部栏后退按钮不可见

时间:2019-03-07 15:01:47

标签: android react-native back-button react-native-navigation wix-react-native-navigation

我正在使用react-native制作一个应用程序,其中使用Wix的react-native-navigation进行导航。但是在添加启动画面后,顶部栏的后退按钮变得不可见。我不知道为什么会这样,但是在代码中添加了启动画面后,后退按钮消失了。我跟随https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae这个博客添加了启动屏幕,它可以正常工作,但是问题是返回按钮。在所有屏幕上都不可见。

以下是我推送屏幕的代码。

goTrustyLogin = () => {
    this.goClose()
    Navigation.push('mainStack', {
      component: {
        name: 'app.Login',
        options: {
          topBar: {
            visible: true,
            animate: false,
            //hideOnScroll: true,
            //buttonColor: 'white',
            drawBehind: false,
            title: {
              text: 'Trusty Login',
              fontSize: 18,
              //color: 'white',
              fontFamily: 'Ubuntu',
              alignment: 'center'
            },
            backButton: {
              // icon: require('icon.png'),
              id: 'backButton',
              visible: true,
              //color: 'white'
            },
            background: {
              //color: '#1abc9c'
            }
          },
          sideMenu: {
            left: {
              enabled: false
            }
          },
          animations: {
            push: { // It works! Push with animation from right to left
              waitForRender: true,
              content: {
                x: {
                  from: 1000,
                  to: 0,
                  duration: 100,
                },
                alpha: {
                  from: 1,
                  to: 1,
                  duration: 100,
                }
              }
            },
            pop: { // It works! Pop with animation from left to right
              content: {
                x: {
                  from: 0,
                  to: 1000,
                  duration: 100,
                },
                alpha: {
                  from: 1,
                  to: 1,
                  duration: 100,
                }
              }
            }
          }
        }
      }
    });
  }

我不知道确切的问题是什么。请帮忙。预先感谢。

0 个答案:

没有答案