如果我点击文本输入,我希望能够点击其他地方以便再次解除键盘(尽管不是返回键).我在所阅读的所有教程和博客文章中都没有找到关于这方面的最细微信息.
这个基本示例对我来说仍然不适用于模拟器中的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>
Run Code Online (Sandbox Code Playgroud)