0
反應原生視圖顯示iPhone Plus版本中的扭曲像素,而同一視圖在iPhone 5,6或7版本上顯示得非常優雅。某些時候的視圖看起來更加糟糕,那麼下面的圖片就是iPhone的加號版本。 代碼如下,React原生視圖在iPhone Plus上顯示扭曲像素
<View style={[styles.headerRow, { paddingHorizontal: 5 }]} >
<View style={{ flex: 3, borderColor: theme.color.gray.light, borderRightWidth: .5, alignSelf: 'center' }}>
<Text style={[skin.text.smaller, skin.text.bold, { textAlign: 'center', padding: 8 }]}>{'TITLE'}</Text>
</View>
<View style={{ flex: 2, alignItems: 'center', borderColor: theme.color.gray.light, borderRightWidth: .5, alignSelf: 'center' }}>
<Text style={[skin.text.smaller, skin.text.bold, { textAlign: 'center', padding: 8 }]}>{'BUCKIT'}</Text>
</View>
<View style={{ flex: 2.8, alignItems: 'center' }}>
<Text style={[skin.text.smaller, skin.text.bold, { textAlign: 'center', padding: 8 }]}>{'YOUR AVERAGE'}</Text>
</View>
</View>
使用屏幕寬度DIVID柱代替撓性也不會有幫助。