react native - Setting background image position (i.e. `background-position-x` and `background-position-y` in web) -


when have background image:

<image style={{flex: 1, width: null, height: null, resizemode: 'cover'}} source={require('../images/background.png')}>     <!-- children --> </image> 

i expecting image cover entire screen while keeping image's aspect ratio. (see so question why i'm using width: null, height: null.)

however, if image width far smaller height, image centered crops top.

question: how make image start top instead, background-position: 50% 0 in web?


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -