【发布时间】:2021-06-01 01:21:34
【问题描述】:
我正在使用 react native 的 ImageBackground 组件,但在 IOS(设备)中它不显示图像,在模拟器中出现图像 这可能是什么?
代码如下:
import { ImageBackground } from 'react-native';
const imgSrc = require('../../assets/images/bg-login.png');
<ImageBackground
resizeMode="cover"
source={imgSrc}
style={style.backgroundImage}
>
样式如下:
backgroundImage: {
width: screenWidth,
height: '100%'
},
【问题讨论】:
标签: ios image react-native react-native-image imagebackground