When I use in react-native it gives warning that using with children is deprecated and will be error in future. User instead.
So,
If I use it doesn't give expected result which I was getting using
Here is the code I wrote for using
<ImageBackground source={require('../../img/splash/splash_bg.png')} style={styles.backgroundImage} >
</ImageBackground>
And style code is
const styles = StyleSheet.create({
backgroundImage: {
flex: 1,
// width: undefined,
// height: undefined,
// flexDirection: 'column',
// backgroundColor:'transparent',
// justifyContent: 'flex-start',
},}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…