react native modal
app在某些时刻需要提示一些信息时,就可用到modal
modal常见的属性
animationType: enum('none', 'slide', 'fade') 动画类型
onRequestClose: Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func modal被销毁时调用该方法
onShow: function 显示完毕的回调方法
transparent: bool 是否为透明,默认为不透明,弹框需要将这个设置成 true.
visible: bool 是否显示
例:
<Modal
animationType='fade'
transparent={true}
visible={this.state.visible}
onShow={this.onShow.bind(this)}
onRequestClose={() =>console.log('onRequestClose...')} >
<View style={[styles.modalStyle,backgroundStyle]}>
.....
//这些省略号可以自已定义里面的视图
</View>
</Modal>
这个人暂时没有 freestyle