我想在视图中添加一个全屏图像,所以我写了这段代码
return (
    <View style={styles.container}>
        <Image source={require('image!egg')}  style={styles.backgroundImage}/>
    </View>
)
并将样式定义为
var styles = StyleSheet.create({
container: {
     flex: 1,
     justifyContent: 'center',
     alignItems: 'center',
     backgroundColor: '#F5FCFF',
     flexDirection: 'column',
},
     backgroundImage:{
     width:320,
     height:480,
   }
...
但是这样我应该如何找到实际的 iPhone 屏幕尺寸?
我见过一个 API 来访问像素密度,但对屏幕尺寸一无所知......