如何添加窗体从图像点击原生反应?
问题描述:
我是新的反应原生,我想添加表单在底部如果点击图像反应原生。这是我的代码如何添加窗体从图像点击原生反应?
<View>
<TouchableHighlight onPress={() => this._addForm()}>
<Image source={require('../images/plus.png')} />
</TouchableHighlight>
</View>
{this._addForm()}
此功能
_addForm(){
<View>
<TextInput
autoCorrect={false}
style={styles.inputVal}
onChangeText={(category) => this.setState({category})}/>
</View>
}
请帮助。感谢
答
一种方法是如下:
有做这件事以及其他方式。