TextInput在ios中不能输入中文
不能value和onChangeText同时使用,在IOS中使用onEndEditinglet publishtitle;if(Platform.OS==='android'){publishtitle=(<TextInputstyle={[styles.textInput, styles.textAlign]}placeholder="请输...
·
不能value和onChangeText同时使用,在IOS中使用onEndEditing
let publishtitle;
if(Platform.OS==='android'){
publishtitle=(<TextInput
style={[styles.textInput, styles.textAlign]}
placeholder="请输入"
maxLength={6}
underlineColorAndroid='transparent'
value={this.state.publishTitle}
onChangeText={(text) => this.handleTitleText(text)}
/>)
}else{
publishtitle=( <TextInput
style={[styles.textInput, styles.textAlign]}
placeholder="请输入"
maxLength={6}
underlineColorAndroid='transparent'
value={this.state.publishTitle}
onEndEditing={(evt) => {
this.handleTitleText(evt.nativeEvent.text);
}}
/>)
}
更多推荐


所有评论(0)