我想在模态屏幕上添加一个后退按钮,它可以消除ios中的模态屏幕。像android.I中的模态的默认行为一样使用react-native-navigation(V1)
使用Navigation.dismissModal(this.props.componentId)
来消除当前模态。将此按钮放在要触发它的位置。
<Button
onPress={() => Navigation.dismissModal(this.props.componentId)}
title="Back"
color="#841584"
/>