2017-12-02 9 views
0

ReactネイティブビューはiPhone Plusバージョンで歪んだピクセルを表示しますが、iPhone 5,6,7では同じビューが非常に上品に表示されます。いつの間にか、iPhoneのプラスバージョンでは、以下の画像がさらにひどく見えます。 enter image description here コードは次のようにも役立ちますしない代わりに、フレックスの列をdivIdは、画面幅を使用して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> 

、です。

答えて

0

SOLUTION:

私は、解決策を見つけたiOSが1少ないしborderWidthを設定好むていないので、あなたは、1つの以上の値を使用するか、または反応し、ネイティブのどちらか0.3に設定されたデフォルト値を持っているhairlineWidth呼ばStylesSheet変数を提供します。コンポーネントのコンストラクターでStyleSheet.hairlineWidth = 0.5を設定して値を変更することができます。

<View style={{borderWidth: StyleSheet.hairlineWidth}}> ... </View> 
関連する問題