Modal组件可以用来覆盖包含React Native根视图的原生视图(如UIViewController,Activity)。
在嵌入React Native的混合应用中可以使用Modal。Modal可以使你应用中RN编写的那部分内容覆盖在原生视图上显示。
animationType PropTypes.oneOf(['none', 'slide', 'fade'])
The animationType prop controls how the modal animates.
•slide slides in from the bottom
•fade fades into view
•none appears without an animation
动画类型(无,滑动,消失)
从底部滑动出现;从视图消失;无动画效果
onRequestClose Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func
The onRequestClose prop allows passing a function that will be called once the modal has been dismissed.
On the Android platform, this is a required function.