I want to make a slider vertical on ios. I have a component that looks like this, the text labels are just for visualisation
export class VerticalSlider extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Hello</Text>
<Slider
maximumValue={100}
minimumValue={0}
value={50}
minimumTrackTintColor="black"
style={{
transform: [{ rotate: '90deg' }]
}}
/>
<Text>Hello</Text>
</View>
)
}
}
This is how it looks in my simulator
It looks like flex box lays out the components before the rotation, then it gets rotated 90 degrees and it overlaps with the text labels above and below. I would expect the top of the slider to be at the bottom of the first label and the second label to be pushed down.
Is there something i can do to fix this?
Here are my versions:
"dependencies": {
"expo": "^29.0.0",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-29.0.0.tar.gz"
}