Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

ReactNative TextInput not visible iOS

$
0
0

I have the following stripped down render result:

return (<View style={{backgroundColor:'red'}}><TextInput value={'Hello'}/></View>);

The generated TextInput is not visible in iOS, unless I specify the height, and when using flexDirection:'row' in its container, I need to specify its width as well.

This only happens with iOS, Android seems to work as expected.

Is there a way of displaying a TextInput in iOS without fixed size?

Current dependencies:

"dependencies": {"react-native": "=0.18.1","react-native-orientation": "=1.12.2","react-native-vector-icons": "=1.1.0"  },

iOS:

enter image description here

Android:

enter image description here

Changing the render like this:

return (<View style={{backgroundColor:'red'}}><Text>text</Text><TextInput value={'Hello'}/></View>);

has the following result:

iOS:

enter image description here

Android:

enter image description here


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>