react native style if ios code example
Example 1: react native get OS
const design = Platform.select({
android: {
header: true
},
ios: {
header: false
},
});
Example 2: how to use platform.select
import {Platform} from 'react-native';
st styles = StyleSheet.create({
container: {
flex: 1,
...Platform.select({
ios: {
backgroundColor: 'red',
},
android: {
backgroundColor: 'blue',
},
}),
},
});