如果我点击一个文本输入,我希望能够点击其他地方,以便再次关闭键盘(而不是return键)。在我读过的所有教程和博客文章中,我都没有找到任何关于这方面的信息。
这个基本的例子仍然不适用于我在模拟器中使用react-native 0.4.2。还不能在我的iPhone上试用。
<View style={styles.container}>
  <Text style={styles.welcome}>
    Welcome to React Native!
  </Text>
  <Text style={styles.instructions}>
    To get started, edit index.ios.js
  </Text>
  <Text style={styles.instructions}>
    Press Cmd+R to reload,{'\n'}
    Cmd+D or shake for dev menu
  </Text>
  <TextInput
    style={{height: 40, borderColor: 'gray', borderWidth: 1}}
    onEndEditing={this.clearFocus}
  />
</View>https://stackoverflow.com/questions/29685421
复制相似问题