我正在使用React Native Modal,我希望Modal的背景是透明的,并且我希望Modal显示代表屏幕
如何达到同样的要求,我哪里出错了?
下面是相同的代码,请看一下:
import React, { Component } from 'react'
import { Modal, View, Text, Dimensions, Platform, TouchableOpacity, Alert, StyleSheet, Button } from 'react-native'
import Icon from 'react-native-vector-icons/Entypo'
const windowWidth = Dimensions.get('window').width;
const windowHeight = Dimensions.get('window').height;
export class MyComponent extends Component {
render = () => {
const message = 'Do you want to upload the video now or wait until you are connected to wi-fi?'
return (
<Modal
animationType='slide'
transparent={true}
style={{backgroundColor: 'black'}}
>
<View style={styles.content}>
<View style={styles.closeBtn}> …Run Code Online (Sandbox Code Playgroud)