1
我已經創建了一個按鈕,我想要在點擊時調用一個函數,然後在發佈時再調用一個函數。一個正常的TouchableOpacity或其他只會在點擊發布後觸發一個函數,我需要單擊和釋放函數。React Native onStartShouldSetResponder和onResponderRelease?
<View style={styles.touchbutton}
onStartShouldSetResponder={() => this.clickOn()}
onResponderRelease={() => this.clickRelease()}>
<Text style={styles.dark}>Button</Text>
</View>
上面的代碼適用於點擊,但不適用於發佈。我也試過onResponderReject,但這也不起作用。很難找到該命令應該是什麼。