React Native 复选框在 Android 中显示正常,但在 ios 中显示为一个小红点。该复选框在 ios 中有效还是仅在 Android 中有效?
<CheckBox
label='I accept the Terms and Conditions'
value={this.state.checked}
onValueChange={() => this.setState({ checked: !this.state.checked })}
/>
最佳答案
由 react-native
提供的 CheckBox
组件仅适用于 Android,因为它在 documentation 中非常清楚地说明了以下内容
Renders a boolean input (Android only).
它也没有 label
属性。
其列出的 Prop 是:
- View props..
已禁用
onChange
onValueChange
测试ID
值
关于ios - React Native 复选框显示为红点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55191528/