I just want to place this image to the top of the screen with ImageBackground component of React Native, using this background image resizeMode='contain'
(NOT cover) since the image is fit to dimensions now I need to place it on top.
Found some solution like here:- https://stackoverflow.com/a/55674160/21163479
But it doesn't seems to be working.
Here is my code:-
import { Text, SafeAreaView, ImageBackground } from 'react-native'import React from 'react'const Login = () => { return (<SafeAreaView style={[{flex: 1}]}><ImageBackground source={require('../assets/img/auth-bg.jpg')} resizeMode='contain' style={[{ flex: 1, justifyContent: 'flex-start', backgroundColor: 'pink' }]} imageStyle={[{ resizeMode: 'contain', alignSelf: 'flex-start' }]}><Text>--CONTENT HERE--</Text></ImageBackground></SafeAreaView> )}export default Login
And here how it looks:-