代码之家  ›  专栏  ›  技术社区  ›  Shoeb Siddique

如何从SafeViewArea | React Native | iPhoneX中删除上边距

  •  1
  • Shoeb Siddique  · 技术社区  · 6 年前

    我需要使用 SafeViewArea 对于iPhoneX,但当我 安全视域 然后从顶部显示一些不需要的额外边距。

    enter image description here

    render () {
    
        return (
    
          <SafeAreaView forceInset={{ top: 'always' }} style={styles.applicationView}>
            <View style={styles.applicationView}>
              <StatusBar barStyle='light-content'/>
              <ReduxNavigation/>
            </View>
          </SafeAreaView>
        )
      }
    

    styles.js

    export default StyleSheet.create({
      applicationView: {
        flex: 1
      },
      container: {
        flex: 1,
        justifyContent: 'center',
        backgroundColor: Colors.background
      },
      welcome: {
        fontSize: 20,
        textAlign: 'center',
        fontFamily: Fonts.type.base,
        margin: Metrics.baseMargin
      },
      myImage: {
        width: 200,
        height: 200,
        alignSelf: 'center'
      }
    })
    

    编辑:如何删除的阴影 SurfaceViewArea

    欢迎提出建议。 提前谢谢。

    0 回复  |  直到 6 年前