我想知道是否可以调整图像大小以适合视图内部。将图像调整为视图 - 反应原生
这就是我现在
<View style={styles.container}>
<View style={styles.header}>
<Image
source={headerImage}
/>
</View>
<Text style={styles.basicText}>text</Text>
</View>
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff"
},
header: {
height: 200,
backgroundColor: 'red'
},
background: {
width: null,
height: null
},
image: {
}
我想使图像配合入头查看有没有。
你可以尝试'resizeMode' http://facebook.github.io/react-native/releases/0.45/docs/image.html –