解决方法
你可以使用
PixelRatio
例如:
var React = require('react-native'); var {StyleSheet,PixelRatio} = React; var FONT_BACK_LABEL = 18; if (PixelRatio.get() <= 2) { FONT_BACK_LABEL = 14; } var styles = StyleSheet.create({ label: { fontSize: FONT_BACK_LABEL } });