【发布时间】:2017-11-09 10:13:01
【问题描述】:
我有两个按钮,它们都调用相同的 onPress 函数。在回调中,我希望能够区分被按下的。
<MKRadioButton
title='A'
group={this.radioGroup}
onPress={this._toggle}
/>
<MKRadioButton
title='B'
group={this.radioGroup}
onPress={this._toggle}
/>
然后调用
_toggle(event) {
//what should go here to figure out if title A or B was called?
}
【问题讨论】:
标签: button react-native onpress