My usage like this
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
import { ScaledSheet } from 'react-native-size-matters';
import { Dimensions, PixelRatio } from 'react-native';
const {
width: SCREEN_WIDTH,
height: SCREEN_HEIGHT,
} = Dimensions.get('window');
// based on iphone 5s's scale
const scale_a = SCREEN_WIDTH / 320;
export function normalize(size) {
const newSize = size * scale_a
if (Platform.OS === 'ios') {
return Math.round(PixelRatio.roundToNearestPixel(newSize))
} else {
return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2
}
}
and styles:
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'flex-start',
},
text_üst: {
fontSize: normalize(25),
fontFamily: 'Raleway-Medium',
color: '#fff',
textAlign: 'center',
marginTop: moderateScale(90)
},
});
const size_styles = ScaledSheet.create({
inputLayout_üst: {
marginTop: moderateScale(80),
width: '300@s'
},
inputLayout: {
marginTop: moderateScale(20),
width: '300@s'
},
textInput: {
fontSize: normalize(16),
fontFamily: 'Raleway-Medium',
height: '40@vs',
color: '#fff',
textAlign: 'center',
},
btn: {
width: '280@s',
height: '50@vs',
resizeMode: 'stretch',
},
});
design:
<Text style={styles.text_üst}>Oturum Aç</Text>
<TextInputLayout
style={size_styles.inputLayout_üst}
checkValid={t => EMAIL_REGEX.test(t)}
hintColor='#fff'
errorColor='#fff'
focusColor='#fff'>
<TextInput
onChangeText={(text) => this.setState({ USER_MAIL: text })}
style={size_styles.textInput}
placeholder={'Mail Adresiniz'}
keyboardType={'email-address'}
/>
</TextInputLayout>
my all screens usage like this but app store rejected my app:
Guideline 4.0 - Design
We noticed that several screens of your app were crowded or laid out in a way that made it difficult to use your app.
Next Steps
To resolve this issue, please revise your app to ensure that the content and controls on the screen are easy to read and interact with.
and this link their screenshots:
sorry for bad english.
i changed ios deployment target 9.0 to 11.0 is it solution?