因为当我这样做时,什么都不呈现。 最后的想法是为整个应用程序提供一个共同的背景图像。 我试图在图像中包装导航器,结果相同。React Native:是否有可能在视图中有导航器?
<View style={styles.container}>
<Image source={pic} style={styles.backgroundImage}></Image>
<Navigator
configureScene={this.configureScene}
style={styles.app}
initialRoute={{ component: Main }}
renderScene={this.renderScene}
/>
</View>
我不这么认为。您可能想要将render背景图像作为renderScene的一部分来处理,但我主要是猜测。 –
检查此问题http://stackoverflow.com/questions/31319947/how-to-set-a-background-image-of-navigator-in-react-native?rq=1 – Jickson
谢谢@Jickson我看过它已经。但是当我这样做时,没有场景被渲染......所以我猜测新版本的RN版本已经改变了现在的做法 – sebap