我正在使用 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%'
},