其实这个问题很简单,利用ScrollView和KeyboardAvoidingView即可完成并且点击空白处光标自动消失,顺便记录了下多行文本输入框实现。
<ScrollView
contentInsetAdjustmentBehavior="automatic">
<KeyboardAvoidingView style={{marginTop:300}} behavior='padding' keyboardVerticalOffset={150}>
<TextInput style={{height:100,width:300,borderWidth:1,borderColor:'#666',textAlign:'left',textAlignVertical:'top'}} multiline= {true} onChangeText={ text => this.text=text}/>
</KeyboardAvoidingView>
</ScrollView>