Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios React原生应用程序iphone 11主屏幕上的全屏背景图像_Ios_Typescript_React Native - Fatal编程技术网

Ios React原生应用程序iphone 11主屏幕上的全屏背景图像

Ios React原生应用程序iphone 11主屏幕上的全屏背景图像,ios,typescript,react-native,Ios,Typescript,React Native,我目前正试图在iPhone11上的登录视图上设置一个完整的背景图像 const Background = styled.ImageBackground` padding:20px; justify-content:center; width:100%; height:100%; ` const styles = StyleSheet.create({ imageContainer: {

我目前正试图在iPhone11上的登录视图上设置一个完整的背景图像

     const Background = styled.ImageBackground`

      padding:20px;
      justify-content:center;

      width:100%;
      height:100%;
      `
      const styles = StyleSheet.create({
            imageContainer: {
              flex: 1,
              alignItems: 'stretch'
            },
            image: {
              flex: 1
            }
          });
    
        return <SafeAreaView style={styles.imageContainer}><Background style={styles.image} source={require('../../assets/images/background-cover.jpg')}>
            <CoverLogo width={100} height={100} color={Colors.White} />
    
            <Introduction loop={false}>
                <TextHeading text={`TestHeader`} />
                
            </Background>
        </SafeAreaView>
const Background=styled.ImageBackground`
填充:20px;
证明内容:中心;
宽度:100%;
身高:100%;
`
const styles=StyleSheet.create({
图像容器:{
弹性:1,
对齐项目:“拉伸”
},
图片:{
弹性:1
}
});
返回
当前输出的内容:


我想让背景占据空白。此问题似乎只出现在手机11s中

您应该使用图像包装SafeAreaView,并确保SafeAreaView的不透明度设置为0

<ImageBackground
    source={imgsrc}
    style={{position: "absolute", height: "100%", width: "100%"}}>
    <SafeAreaView style={{opacity: 0}}>
       // place for your app components
    </SafeAreaView>
</ImageBackground>

//放置应用程序组件的位置

尝试删除安全区域视图它仍然不起作用您是否在Xcode设置中使用全屏?@SaachiTech如何做到这一点?您可以在这里找到选项
项目目标>常规>部署信息