当前用户界面: 图片 1
预期的用户界面:图 2
问题是如何在 react native 中使图像适合有边界的半径视图组件?
只需将您的视图设置为使用 resizeMode={'cover'} 和宽度和高度 100% 来制作欲望和其中的图像
<View style={{ flex: 1 }}>
<View style={{ width: '100%', height: '60%', borderBottomLeftRadius: '50%', borderBottomRightRadius: '50%' }}>
<Image source={require(...)} style={{ width: '100%', height: '100%'}} resizeMode={'cover'}/>
</View>
</View>