I use the default components: View and Navigator. I want to set automatic height for View and Navigator, but if there are no styles with height for View - Navigator does not display, as it is: absolute. If the specified component is Text in View - View get auot height from child Text component. And if I set the "height: auto" parameter for View, this property does not work.
render() {
return (
<View style={{height: 'auto', backgroundColor: 'powderblue'}}>
<Navigator
initialRoute={{ title: 'My Initial Scene', index: 0 }}
renderScene={(route, navigator) => {
return (
<MyScene
title={route.title}
/>
)
}
}
/>
</View>
)
}
Run codeHide result
Slava source
share