在IOS中,如何通过在native native中使用setNativeProps来更改图像的源

时间:2017-12-21 10:57:52

标签: ios image react-native

我正在以本机方式开发UI,并且我尝试使用setNativeProps来更改<Image>的来源。

我的代码在android中运行良好:

this._imageReference.setNativeProps({ src: [{uri: "http://myImage.jpg"}] });

在IOS中,语法似乎是:

this._imageReference.setNativeProps({ source: [{uri: "http://myImage.jpg"}] });

但它在我的案例中并不起作用。

你有什么想法吗?

由于

0 个答案:

没有答案