2017-05-30 43 views
0

我是新的反应原生,我想添加表单在底部如果点击图像反应原生。这是我的代码如何添加窗体从图像点击原生反应?

<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> 
    } 

请帮助。感谢

回答

0

一种方法是如下:

​​

有做这件事以及其他方式。