How to create a transparent topBar and draw behind it (RNN V2)

时间:2018-10-02 09:15:12

标签: javascript reactjs react-native navigation react-native-navigation

I would like to create a Screen with a transparent topBar and want to be able to draw behind it. (React Native Navigation v2)

enter image description here

2 个答案:

答案 0 :(得分:0)

您可以使用在视图上启用的透明模式。但是,这种方法需要一点编码。另一种方法是,我通过自定义THIS组件来做类似的事情。让我知道它是否对您有用:)

答案 1 :(得分:0)

class PushedScreen extends Component {
  static options(props) {
    return {
      topBar: {
        title: 'Transparent TopBar',
        background: {
          color: 'transparent',
          translucent: true, // iOS only, optional
          blur: true // iOS only, optional
        }
      },
    };
  }

...
}