【发布时间】:2016-11-02 00:44:25
【问题描述】:
我正在使用 react-native 0.28.0
我正在尝试根据本教程在 iPhone 模拟器上显示图像:Introduction to React Native: Building iOS Apps with JavaScript | Appcoda
var styles = StyleSheet.create({
image: {
width: 107,
height: 165,
padding: 10
}
}
var imageURI = 'http://books.google.com/books/content?id=PCDengEACAAJ&printsec=frontcover&img=1&zoom=1&source=gbs_api'
然后在render()函数中,我添加了这个:
<Image style={styles.image} source={{uri:imageURI}} />
为图像分配的空间在那里,但图像不显示。
【问题讨论】:
标签: javascript ios react-native