Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

How to clip off the image if its outside bounds react native

$
0
0

I'm new to react native development. I want the image to be in aspect ratio and when I try to change its bounds the area outside the bounds should be clipped off. In Android, it is working correctly but not in iOS the image is not clipping to its bounds and showing the whole image.

<View      style={{        backgroundColor: "#04894a",        padding: 10,        height: 110,        alignItems: "center"      }}><View        style={{          alignItems: "center"        }}><Image          style={{ height: 150, width: 150 }}          source={require("../images/wow_logo.png")}        /></View>

The image is going outside the view but still, it is showing in full. I want it to be cropped if going outside the bounds. Can anyone help me with this? Any links or suggestions are also appreciated.TIA


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>