无法在React Native中显示图片。
- 论坛
- 无法在React Native中显示图片。
23 浏览
无法在React Native中显示图片。
我正在使用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()
函数中,我添加了以下代码:
图片所占的空间是存在的,但是图片没有显示出来。