【发布时间】:2015-07-23 21:28:09
【问题描述】:
我正在尝试将图像从 Parse 添加到 React Native Project。 添加文本一切正常:
<Text style={{flex: 1, fontSize: 14, textAlign: 'justify', color: 'black', }}>
{this.props.tweet.get('username')}
</Text>
但我无法添加图片:
<Image source={this.props.tweet.get('photo')}
style={{width: 50, height: 50}}/>
我也在尝试
var photo = this.props.tweet.get('photoprofile');
....code
<Image source={{uri: {photo}}}
style={{width: 50, height: 50}}/>
和
var photo = this.props.tweet.get('photoprofile');
....code
<Image source={photo}
style={{width: 50, height: 50}}/>
它不起作用。
【问题讨论】:
-
你应该提到你正在处理的对象的原型。并且使用正确的图像 url 在源中添加 uri 将起作用。
标签: image parse-platform add react-native